Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.85 KB | None | 0 0
  1. <uncletobai> here's where n-3 is coming from
  2. <uncletobai> for every configuration of 4 adjacent spaces
  3. <lama> i'm so slow thats impossible
  4. <uncletobai> you can pick the left-most or first space of the four
  5. <uncletobai> you can have such a 4-space-configuration starting at 1
  6. <lama> uhm
  7. <uncletobai> you can have one starting at 2 etc
  8. <lama> right
  9. <lama> #HERE####
  10. <lama> ##HERE###
  11. <uncletobai> but you cant start close to the end, that is close to n
  12. <lama> ?
  13. <uncletobai> exactly
  14. <uncletobai> you cant have #######HE
  15. <lama> thats on the opposite end of the row
  16. <lama> thats not gonna fit
  17. <uncletobai> exactly
  18. <uncletobai> so you can only go to n-3
  19. <lama> #####HERE
  20. <uncletobai> because the last configuration to fit is n-3, n-2, n-1, n
  21. <lama> 9-3, thats 6
  22. <lama> heh, it works
  23. <uncletobai> what we did is counting startspaces instead of spaces
  24. <uncletobai> ebcause for every 4-space there is exactly one start-space
  25. <uncletobai> so we just count those instead
  26. <lama> so the general principle is to determine the last working configuration?
  27. <uncletobai> and notice that the only start-spaces possible are 1, 2, all the way to n-3
  28. <lama> uhm
  29. <lama> isn't there plenty of start spaces?
  30. <lama> ############################
  31. <uncletobai> if thats about 20 #'s, then yes, 20-3 = 17 start spaces
  32. <uncletobai> the last possible start space is at 17, because the right-most configuration would be 17,18,19,20
  33. <uncletobai> or in your notation ########################HERE
  34. <uncletobai> the H is in position 17
  35. <lama> i understand now that i has to fit, but i wouldn't guess that this is equal to the number of start spaces
  36. <lama> so
  37. <uncletobai> by start spaces i mean the first of the four adjacent spaces
  38. <uncletobai> or the H in your notation
  39. <lama> crap now i'm not sure how to use this
  40. <lama> HERE is four letters so its convinient :D
  41. <lama> so that way i can determine how many adjacent parking spaces are there
  42. <uncletobai> you could number the spaces (s1,s2,...,sn)
  43. <lama> there are n-3 parking spaces
  44. <lama> oh, and total of n choose 4 possibilities, because these are all subsets of {n}
  45. <lama> i don't know how to write it {1,...,n}
  46. <uncletobai> exactly
  47. <lama> :(
  48. <uncletobai> whats wrong? you got it right
  49. <lama> no i didn't
  50. <lama> i would never figured that out myself
  51. <lama> and there are like 50 more exercices like this one
  52. <uncletobai> these things take a lot of practice
  53. <lama> *excersices
  54. <lama> crap i can't even spell that
  55. <lama> yeah, i have two days, thats not enough
  56. <lama> i have a lot of trouble learning something that can't be algorithmized
  57. <uncletobai> preparing for a test?
  58. <lama> yes, finals
  59. <lama> i'm not sure how to solve problems that can't be algorithmized
  60. <lama> meaning that there is no algorithm which could be followed
  61. <uncletobai> https://www.khanacademy.org/math/probability/probability-and-combinatorics-topic
  62. <lama> whoa
  63. <uncletobai> i haven't watched those but they might be helpful
  64. <lama> there are lots of it, i could try probability using combinatorics :D
  65. <lama> its just
  66. <lama> it seems afwul to drop out from colledge after passing some many hard classes
  67. <lama> and then fail on simple combinatorics
  68. <uncletobai> combinatorics is one of the fields where a lot of practice is necessery but once it "clicks" it will be very easy
  69. <lama> but i'm afraid that it won't click in two days
  70. <lama> i have to learn this and also a conditional probability
  71. <lama> and the worst part is, that the exams is actually easy
  72. <lama> *exam
  73. <lama> but i just can't think like that
  74. <uncletobai> try finding a pdf online that has worked solutions
  75. <lama> i can do statistics and such, because i can follow an algorithm
  76. <lama> but there are gonna be only 2 problems on that, and another 3 will be probability
  77. <lama> haha the exercise continues with: what is the probability that at least two parking spaces are next to each other :D
  78. <uncletobai> given that there are four empty spaces?
  79. <lama> and what does the former (4!(n-4)!)/n! says?
  80. <lama> no, its just another question they have
  81. <lama> no
  82. <lama> yes
  83. <lama> :D
  84. <lama> there are still four empty spaces
  85. <uncletobai> ok
  86. <lama> i could try to figure out what is the probability that no 2 spaces are adjacent
  87. <lama> and then negate
  88. <uncletobai> that was my first idea too
  89. <lama> i have some results but i don't know if they are correct
  90. <lama> so i'm trying reading them and understand
  91. <uncletobai> try to get it yourself first
  92. <uncletobai> might be more rewarding
  93. <uncletobai> i have to go now, ill be back in about 20 mins then we can discuss it some more if you want
  94. <lama> ok:)
  95. <lama> thank you for the help
  96. <uncletobai> the problem seems a bit more tricky than the last
  97. <uncletobai> i found a solution online
  98. <uncletobai> http://math.stackexchange.com/questions/488748/simple-probability-question-with-two-colored-balls
  99. <uncletobai> note that this is the same question as yours
  100. <uncletobai> white balls = taken spac es
  101. <uncletobai> black balls = free spaces
  102. <lama> that looks the same
  103. <lama> in my notes there is 1 - n choose 7 / n choose 4, no idea how we go that, it may be wrong
  104. <lama> i'll read the article
  105. <lama> *got that
  106. <lama> *how we got that
  107. <uncletobai> i wonder where that 7 comes from
  108. <lama> exactly
  109. <lama> There are (m+nm)(m+nm) distinguishable arrangements of the balls in a row
  110. <lama> ?
  111. <lama> m+n choose m
  112. <lama> how
  113. <lama> thats just for black balls
  114. <uncletobai> theres a total of m+n balls
  115. <lama> yes
  116. <uncletobai> and m positions where the black balls are
  117. <lama> (m+n)! should give all possible arrangements
  118. <uncletobai> that would be true if the balls are distinguishable
  119. <uncletobai> say if the black balls would be numbered
  120. <uncletobai> then would black_1 black_2 black_3 != black_2 black_1 black_3
  121. <lama> can i divide (m+n)! by the number of identical combinations?
  122. <lama> like (a,b) = (b,a)
  123. <uncletobai> yes you can
  124. <lama> so i would divide by 2
  125. <uncletobai> in these kinds of problems
  126. <uncletobai> it never matters
  127. <lama> but i don't know how many are is that
  128. <lama> *how many is that
  129. <uncletobai> if you label the objects or not
  130. <uncletobai> but you have to count the same way in the nominator and denominator
  131. <lama> This is a standard stars-and-bars problem
  132. <lama> uuuuuuuuuhm
  133. <lama> stars are
  134. <lama> stares are park places
  135. <lama> wait
  136. <lama> but stars and bars don't care about ordering
  137. <lama> i can have ***|**|******
  138. <lama> but i can't distinguish between the stars
  139. <uncletobai> yeah thats why i suggested not counting orderings
  140. <uncletobai> the first solution in my link
  141. <uncletobai> does it without ordering doesnt he?
  142. <lama> i have to mark stars somehow, so i can keep track on if the stars represent an empty space or not
  143. <uncletobai> so the way i understood it
  144. <uncletobai> call the empty spaces B
  145. <uncletobai> and look at this thing here
  146. <uncletobai> _ B _ B _ B _ B _
  147. <uncletobai> between two Bs you have to put at least one W
  148. <lama> isn't there n-4 '_' spaces?
  149. <lama> yes
  150. <uncletobai> and on the leftmost and rightmost positions you can, but dont have to put at least one W
  151. <uncletobai> in this notation
  152. <uncletobai> we say you can put multiple Ws in the _ position
  153. <lama> leftmost and rightmost must have W
  154. <uncletobai> think about it as inserting there
  155. <lama> what if it starts with B
  156. <uncletobai> no they dont have to
  157. <lama> ok
  158. <uncletobai> this corresponds to not inserting a W to the left or rightmost position
  159. <uncletobai> then it starts with B
  160. <uncletobai> since _ is empty then
  161. <uncletobai> and that position
  162. <lama> _ means empty space? i thought that B is emtpy space
  163. <uncletobai> empty in the sense that there is no white ball there
  164. <lama> _ means 'empty' in a sense that we haven't decided what to put on it
  165. <lama> white ball is non empty space?
  166. <uncletobai> say for example the combination B W B W W B W B W W W W W
  167. <uncletobai> corresponds to _ B _ B _ B _ B _
  168. <uncletobai> where for the leftmost _ we didnt insert any Ws
  169. <uncletobai> but at the rightmost _ we inserted 5 Ws
  170. <lama> ok then
  171. <uncletobai> so the remaining question is
  172. <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
  173. <uncletobai> and for that question the guy posts a link to the stars and stripes problem on wikipedia :D
  174. <lama> uhm ah
  175. <lama> that doesn't sound too smart does it :D
  176. <lama> well stars and bars are telling me how to distribute stars into boxes, or between bars
  177. <lama> so if i figure out the order of stars and bars it will spit out the number of combinations
  178. <uncletobai> yeah in that case the Bs are the bars
  179. <uncletobai> so you have | | | |
  180. <uncletobai> and BETWEEN the bars there has to be at least one star
  181. <lama> oh
  182. <lama> theorem two at wiki
  183. <lama> bar is empty space
  184. <uncletobai> yeah
  185. <lama> star is occupied space
  186. <lama> so that means
  187. <lama> k = 4
  188. <lama> n = n
  189. <lama> 7+4-1 choose 4
  190. <lama> 10 choose 4?
  191. <uncletobai> im not sure if theorem two is right
  192. <uncletobai> is the right one here
  193. <uncletobai> because we have something more special
  194. <lama> its not?
  195. <uncletobai> we want at least one star between any two bars
  196. <lama> it says that thoerem two allows for no stars between bars
  197. <uncletobai> but we dont care if there is a star at the leftmost position
  198. <uncletobai> yeah but then we would count configurations where two bars adjacent, which we dont want
  199. <lama> oh, i'm sorry we are doing it the otherway around and then negate it, i'm sorry, my head is spinning
  200. <uncletobai> i think i have it
  201. <uncletobai> its way easier than in this post
  202. <uncletobai> no guarantee this is right, but i think it is
  203. <uncletobai> lets say the occupied spaces correspond to *s
  204. <uncletobai> then we have n-4 stars: *****************
  205. <lama> yes
  206. <lama> n-4 stars
  207. <lama> occupied spaces
  208. <uncletobai> and how many _s between and left and right to the stars?
  209. <uncletobai> or better, in how many positions can we insert a bar?
  210. <uncletobai> if there is 6 stars: * * * * * *, there is 7 positions were we can put a bar, right?
  211. <uncletobai> 5 positions between the stars, 1 left and one right to it
  212. <lama> yes
  213. <lama> yes
  214. <uncletobai> so for n-4 stars there is n-3 positions where we can put bars
  215. <lama> number of bars is greater by one than number of stars
  216. <uncletobai> exactly
  217. <lama> this hold from the theorem
  218. <lama> i think
  219. <uncletobai> this holds just by observing :D
  220. <uncletobai> now notice, that if we put bars between the stars
  221. <uncletobai> they will always be seperated
  222. <uncletobai> by a *
  223. <uncletobai> if we dont put 2 in the same place
  224. <uncletobai> so the total number of such configurations
  225. <uncletobai> is just the number of ways we can pick four positions for the bar
  226. <uncletobai> for the bars
  227. <uncletobai> which is binomial(#number of possible positions for the bars, 4)
  228. <uncletobai> which is binomial(n-3, 4)
  229. <uncletobai> so in total the answer should be 1 - binomial(n-3, 4) / binomial(n,4)
  230. <lama> so
  231. <lama> the total of all 4-touples from the set of all empty spaces is n-3 choose 4
  232. <lama> i mean
  233. <lama> thats the total of all configurations where the are no two adjacent spaces
  234. <uncletobai> the number of ways you can put 4 stars between n-4 stars is n-3 choose 4
  235. <uncletobai> exactly
  236. <uncletobai> 4 bars i mean
  237. <lama> its confusing why are we choosing 4
  238. <uncletobai> the bars correspond to empty parking spaces
  239. <uncletobai> we want 4 of them
  240. <lama> ah
  241. <lama> rigjt
  242. <lama> right
  243. <uncletobai> picture n-4 filled parking spaces
  244. <uncletobai> we want to put 4 empty parking spaces between the cars
  245. <uncletobai> there is n-3 positions where we can do that
  246. <uncletobai> picking 4 out of n-3 is n-3 choose 4
  247. <uncletobai> its as easy as that
  248. <lama> wait, if there are n-4 filled parking spaces then there are only 4 left
  249. <uncletobai> exactly, we have n-4 filled ones and 4 empty ones
  250. <uncletobai> because there is n in total
  251. <lama> i can shuffle those filled anyway i want because they are indistinguishble
  252. <lama> (bad spelling :D)
  253. <lama> there are n-3 ways to arrange 4 empty parking spaces
  254. <uncletobai> adjacent ones
  255. <lama> n-3 adjacent
  256. <lama> n-3 choose 4 = number of configuration of 4 adjacent free spaces
  257. <uncletobai> n-3 choose 4 = number of configuration of 4 non-adjacent free spaces, sorry i got confused up there
  258. <lama> crap
  259. <lama> :D
  260. <lama> i'm really worried
  261. <lama> i'm very stressed that i won't be able to learn all that in time
  262. <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
  263. <lama> is that true?
  264. <uncletobai> yeah
  265. <lama> in that case
  266. <uncletobai> but by picking 4 of the spaces wich are seperated by the *s
  267. <uncletobai> this holds automatically
  268. <lama> why not n-4 + 4 - 1 choose n - 4
  269. <uncletobai> how do you get that?
  270. <lama> i accidently closed the browser
  271. <lama> :D
  272. <lama> i mean the page
  273. <uncletobai> want me to paste the chatlog?
  274. <lama> i used the 2nd theorem, but thats wrong, we should use the 1st
  275. <lama> that would be excellent
  276. <lama> please
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement