Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <uncletobai> here's where n-3 is coming from
- <uncletobai> for every configuration of 4 adjacent spaces
- <lama> i'm so slow thats impossible
- <uncletobai> you can pick the left-most or first space of the four
- <uncletobai> you can have such a 4-space-configuration starting at 1
- <lama> uhm
- <uncletobai> you can have one starting at 2 etc
- <lama> right
- <lama> #HERE####
- <lama> ##HERE###
- <uncletobai> but you cant start close to the end, that is close to n
- <lama> ?
- <uncletobai> exactly
- <uncletobai> you cant have #######HE
- <lama> thats on the opposite end of the row
- <lama> thats not gonna fit
- <uncletobai> exactly
- <uncletobai> so you can only go to n-3
- <lama> #####HERE
- <uncletobai> because the last configuration to fit is n-3, n-2, n-1, n
- <lama> 9-3, thats 6
- <lama> heh, it works
- <uncletobai> what we did is counting startspaces instead of spaces
- <uncletobai> ebcause for every 4-space there is exactly one start-space
- <uncletobai> so we just count those instead
- <lama> so the general principle is to determine the last working configuration?
- <uncletobai> and notice that the only start-spaces possible are 1, 2, all the way to n-3
- <lama> uhm
- <lama> isn't there plenty of start spaces?
- <lama> ############################
- <uncletobai> if thats about 20 #'s, then yes, 20-3 = 17 start spaces
- <uncletobai> the last possible start space is at 17, because the right-most configuration would be 17,18,19,20
- <uncletobai> or in your notation ########################HERE
- <uncletobai> the H is in position 17
- <lama> i understand now that i has to fit, but i wouldn't guess that this is equal to the number of start spaces
- <lama> so
- <uncletobai> by start spaces i mean the first of the four adjacent spaces
- <uncletobai> or the H in your notation
- <lama> crap now i'm not sure how to use this
- <lama> HERE is four letters so its convinient :D
- <lama> so that way i can determine how many adjacent parking spaces are there
- <uncletobai> you could number the spaces (s1,s2,...,sn)
- <lama> there are n-3 parking spaces
- <lama> oh, and total of n choose 4 possibilities, because these are all subsets of {n}
- <lama> i don't know how to write it {1,...,n}
- <uncletobai> exactly
- <lama> :(
- <uncletobai> whats wrong? you got it right
- <lama> no i didn't
- <lama> i would never figured that out myself
- <lama> and there are like 50 more exercices like this one
- <uncletobai> these things take a lot of practice
- <lama> *excersices
- <lama> crap i can't even spell that
- <lama> yeah, i have two days, thats not enough
- <lama> i have a lot of trouble learning something that can't be algorithmized
- <uncletobai> preparing for a test?
- <lama> yes, finals
- <lama> i'm not sure how to solve problems that can't be algorithmized
- <lama> meaning that there is no algorithm which could be followed
- <uncletobai> https://www.khanacademy.org/math/probability/probability-and-combinatorics-topic
- <lama> whoa
- <uncletobai> i haven't watched those but they might be helpful
- <lama> there are lots of it, i could try probability using combinatorics :D
- <lama> its just
- <lama> it seems afwul to drop out from colledge after passing some many hard classes
- <lama> and then fail on simple combinatorics
- <uncletobai> combinatorics is one of the fields where a lot of practice is necessery but once it "clicks" it will be very easy
- <lama> but i'm afraid that it won't click in two days
- <lama> i have to learn this and also a conditional probability
- <lama> and the worst part is, that the exams is actually easy
- <lama> *exam
- <lama> but i just can't think like that
- <uncletobai> try finding a pdf online that has worked solutions
- <lama> i can do statistics and such, because i can follow an algorithm
- <lama> but there are gonna be only 2 problems on that, and another 3 will be probability
- <lama> haha the exercise continues with: what is the probability that at least two parking spaces are next to each other :D
- <uncletobai> given that there are four empty spaces?
- <lama> and what does the former (4!(n-4)!)/n! says?
- <lama> no, its just another question they have
- <lama> no
- <lama> yes
- <lama> :D
- <lama> there are still four empty spaces
- <uncletobai> ok
- <lama> i could try to figure out what is the probability that no 2 spaces are adjacent
- <lama> and then negate
- <uncletobai> that was my first idea too
- <lama> i have some results but i don't know if they are correct
- <lama> so i'm trying reading them and understand
- <uncletobai> try to get it yourself first
- <uncletobai> might be more rewarding
- <uncletobai> i have to go now, ill be back in about 20 mins then we can discuss it some more if you want
- <lama> ok:)
- <lama> thank you for the help
- <uncletobai> the problem seems a bit more tricky than the last
- <uncletobai> i found a solution online
- <uncletobai> http://math.stackexchange.com/questions/488748/simple-probability-question-with-two-colored-balls
- <uncletobai> note that this is the same question as yours
- <uncletobai> white balls = taken spac es
- <uncletobai> black balls = free spaces
- <lama> that looks the same
- <lama> in my notes there is 1 - n choose 7 / n choose 4, no idea how we go that, it may be wrong
- <lama> i'll read the article
- <lama> *got that
- <lama> *how we got that
- <uncletobai> i wonder where that 7 comes from
- <lama> exactly
- <lama> There are (m+nm)(m+nm) distinguishable arrangements of the balls in a row
- <lama> ?
- <lama> m+n choose m
- <lama> how
- <lama> thats just for black balls
- <uncletobai> theres a total of m+n balls
- <lama> yes
- <uncletobai> and m positions where the black balls are
- <lama> (m+n)! should give all possible arrangements
- <uncletobai> that would be true if the balls are distinguishable
- <uncletobai> say if the black balls would be numbered
- <uncletobai> then would black_1 black_2 black_3 != black_2 black_1 black_3
- <lama> can i divide (m+n)! by the number of identical combinations?
- <lama> like (a,b) = (b,a)
- <uncletobai> yes you can
- <lama> so i would divide by 2
- <uncletobai> in these kinds of problems
- <uncletobai> it never matters
- <lama> but i don't know how many are is that
- <lama> *how many is that
- <uncletobai> if you label the objects or not
- <uncletobai> but you have to count the same way in the nominator and denominator
- <lama> This is a standard stars-and-bars problem
- <lama> uuuuuuuuuhm
- <lama> stars are
- <lama> stares are park places
- <lama> wait
- <lama> but stars and bars don't care about ordering
- <lama> i can have ***|**|******
- <lama> but i can't distinguish between the stars
- <uncletobai> yeah thats why i suggested not counting orderings
- <uncletobai> the first solution in my link
- <uncletobai> does it without ordering doesnt he?
- <lama> i have to mark stars somehow, so i can keep track on if the stars represent an empty space or not
- <uncletobai> so the way i understood it
- <uncletobai> call the empty spaces B
- <uncletobai> and look at this thing here
- <uncletobai> _ B _ B _ B _ B _
- <uncletobai> between two Bs you have to put at least one W
- <lama> isn't there n-4 '_' spaces?
- <lama> yes
- <uncletobai> and on the leftmost and rightmost positions you can, but dont have to put at least one W
- <uncletobai> in this notation
- <uncletobai> we say you can put multiple Ws in the _ position
- <lama> leftmost and rightmost must have W
- <uncletobai> think about it as inserting there
- <lama> what if it starts with B
- <uncletobai> no they dont have to
- <lama> ok
- <uncletobai> this corresponds to not inserting a W to the left or rightmost position
- <uncletobai> then it starts with B
- <uncletobai> since _ is empty then
- <uncletobai> and that position
- <lama> _ means empty space? i thought that B is emtpy space
- <uncletobai> empty in the sense that there is no white ball there
- <lama> _ means 'empty' in a sense that we haven't decided what to put on it
- <lama> white ball is non empty space?
- <uncletobai> say for example the combination B W B W W B W B W W W W W
- <uncletobai> corresponds to _ B _ B _ B _ B _
- <uncletobai> where for the leftmost _ we didnt insert any Ws
- <uncletobai> but at the rightmost _ we inserted 5 Ws
- <lama> ok then
- <uncletobai> so the remaining question is
- <uncletobai> in how many ways can we insert Ws into _ B _ B _ B _ B _, such that the inner _s have at least one W inserted into them
- <uncletobai> and for that question the guy posts a link to the stars and stripes problem on wikipedia :D
- <lama> uhm ah
- <lama> that doesn't sound too smart does it :D
- <lama> well stars and bars are telling me how to distribute stars into boxes, or between bars
- <lama> so if i figure out the order of stars and bars it will spit out the number of combinations
- <uncletobai> yeah in that case the Bs are the bars
- <uncletobai> so you have | | | |
- <uncletobai> and BETWEEN the bars there has to be at least one star
- <lama> oh
- <lama> theorem two at wiki
- <lama> bar is empty space
- <uncletobai> yeah
- <lama> star is occupied space
- <lama> so that means
- <lama> k = 4
- <lama> n = n
- <lama> 7+4-1 choose 4
- <lama> 10 choose 4?
- <uncletobai> im not sure if theorem two is right
- <uncletobai> is the right one here
- <uncletobai> because we have something more special
- <lama> its not?
- <uncletobai> we want at least one star between any two bars
- <lama> it says that thoerem two allows for no stars between bars
- <uncletobai> but we dont care if there is a star at the leftmost position
- <uncletobai> yeah but then we would count configurations where two bars adjacent, which we dont want
- <lama> oh, i'm sorry we are doing it the otherway around and then negate it, i'm sorry, my head is spinning
- <uncletobai> i think i have it
- <uncletobai> its way easier than in this post
- <uncletobai> no guarantee this is right, but i think it is
- <uncletobai> lets say the occupied spaces correspond to *s
- <uncletobai> then we have n-4 stars: *****************
- <lama> yes
- <lama> n-4 stars
- <lama> occupied spaces
- <uncletobai> and how many _s between and left and right to the stars?
- <uncletobai> or better, in how many positions can we insert a bar?
- <uncletobai> if there is 6 stars: * * * * * *, there is 7 positions were we can put a bar, right?
- <uncletobai> 5 positions between the stars, 1 left and one right to it
- <lama> yes
- <lama> yes
- <uncletobai> so for n-4 stars there is n-3 positions where we can put bars
- <lama> number of bars is greater by one than number of stars
- <uncletobai> exactly
- <lama> this hold from the theorem
- <lama> i think
- <uncletobai> this holds just by observing :D
- <uncletobai> now notice, that if we put bars between the stars
- <uncletobai> they will always be seperated
- <uncletobai> by a *
- <uncletobai> if we dont put 2 in the same place
- <uncletobai> so the total number of such configurations
- <uncletobai> is just the number of ways we can pick four positions for the bar
- <uncletobai> for the bars
- <uncletobai> which is binomial(#number of possible positions for the bars, 4)
- <uncletobai> which is binomial(n-3, 4)
- <uncletobai> so in total the answer should be 1 - binomial(n-3, 4) / binomial(n,4)
- <lama> so
- <lama> the total of all 4-touples from the set of all empty spaces is n-3 choose 4
- <lama> i mean
- <lama> thats the total of all configurations where the are no two adjacent spaces
- <uncletobai> the number of ways you can put 4 stars between n-4 stars is n-3 choose 4
- <uncletobai> exactly
- <uncletobai> 4 bars i mean
- <lama> its confusing why are we choosing 4
- <uncletobai> the bars correspond to empty parking spaces
- <uncletobai> we want 4 of them
- <lama> ah
- <lama> rigjt
- <lama> right
- <uncletobai> picture n-4 filled parking spaces
- <uncletobai> we want to put 4 empty parking spaces between the cars
- <uncletobai> there is n-3 positions where we can do that
- <uncletobai> picking 4 out of n-3 is n-3 choose 4
- <uncletobai> its as easy as that
- <lama> wait, if there are n-4 filled parking spaces then there are only 4 left
- <uncletobai> exactly, we have n-4 filled ones and 4 empty ones
- <uncletobai> because there is n in total
- <lama> i can shuffle those filled anyway i want because they are indistinguishble
- <lama> (bad spelling :D)
- <lama> there are n-3 ways to arrange 4 empty parking spaces
- <uncletobai> adjacent ones
- <lama> n-3 adjacent
- <lama> n-3 choose 4 = number of configuration of 4 adjacent free spaces
- <uncletobai> n-3 choose 4 = number of configuration of 4 non-adjacent free spaces, sorry i got confused up there
- <lama> crap
- <lama> :D
- <lama> i'm really worried
- <lama> i'm very stressed that i won't be able to learn all that in time
- <lama> if * represents occupied space and | denotes free space and we want distribute | into * in such way that there are no free space adjacent, then all configurations except || are valid
- <lama> is that true?
- <uncletobai> yeah
- <lama> in that case
- <uncletobai> but by picking 4 of the spaces wich are seperated by the *s
- <uncletobai> this holds automatically
- <lama> why not n-4 + 4 - 1 choose n - 4
- <uncletobai> how do you get that?
- <lama> i accidently closed the browser
- <lama> :D
- <lama> i mean the page
- <uncletobai> want me to paste the chatlog?
- <lama> i used the 2nd theorem, but thats wrong, we should use the 1st
- <lama> that would be excellent
- <lama> please
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement