z 01010 b p z 01 p z 0101 p
play

Z 01010 B = P + Z 01 P + Z 0101 P 1 + 2 zB ( z ) = B ( z ) + P ( z - PowerPoint PPT Presentation

AofA Strings and Tries Q&A 1 Q. OGF for number of bitstrings not containing 01010 ? constructions E + ( Z 0 + Z 1 ) B = B + P Z 01010 B = P + Z 01 P + Z 0101 P 1 + 2 zB ( z ) = B ( z ) + P ( z ) GF equations z 5 B ( z ) = (1 + z 2


  1. AofA Strings and Tries Q&A 1 Q. OGF for number of bitstrings not containing 01010 ? constructions E + ( Z 0 + Z 1 ) × B = B + P Z 01010 × B = P + Z 01 × P + Z 0101 × P 1 + 2 zB ( z ) = B ( z ) + P ( z ) GF equations z 5 B ( z ) = (1 + z 2 + z 4 ) P ( z ) 1 + z 2 + z 4 explicit form B ( z ) = z 5 + (1 − 2 z )(1 + z 2 + z 4 ) 1

  2. AofA Strings and Tries Q&A 2 Q. Rank these patterns by expected wait time in a random bit string. 62 00000 00001 32 01000 34 2 P c (1 / 2) 01010 36 10101 36 2

  3. AofA Words and Mappings Q&A 1 Q. Find the probability that a random mapping has no singleton cycles . C = Z ? SET ( C ) M = SET ( CY C > 1 ( C )) constructions e − C ( z ) 1 ⇣ ⌘ C ( z ) = ze C ( z ) M ( z ) = exp ln 1 − C ( z ) − C ( z ) = EGF equations 1 − C ( z ) coefficients via 
 Lagrange inversion NOT AN EXAM QUESTION 
 ✗ (too much calculation) asymptotic 
 result 3

  4. AofA Words and Mappings Q&A 1 (improved) Q. Give the EGF for random mappings with no singleton cycles . 
 C ( z ) = ze C ( z ) Express your answer as a function of the Cayley function C = Z ? SET ( C ) M = SET ( CY C > 1 ( C )) constructions 1 ⇣ ⌘ C ( z ) = ze C ( z ) M ( z ) = exp ln 1 − C ( z ) − C ( z ) EGF equations e − C ( z ) = 1 − C ( z ) 4

  5. AofA Words and Mappings Q&A 1 (another version) Q. Find the probability that a random mapping has no singleton cycles . 
 Hint : Do not use generating functions. A. Each entry can have any value but its own index, so the number of 
 N -mappings with no singleton cycles is ( N − 1) N ( N − 1) N 1 − 1 � N � = N N N ∼ 1 e 5

  6. Related problems (stay tuned) Q. Find the probability that a random mapping has no singleton or doubleton cycles . EGF probability (asymptotic) e − C ( z ) e − 1 M 1 ( z ) = all cycle lengths > 1 1 − C ( z ) M 2 ( z ) = e − C ( z ) − C ( z ) 2 / 2 all cycle lengths > 2 e − 3 / 2 1 − C ( z ) Rigorous proof requires full mechanism of singularity analysis in the complex plane (stay tuned) 6

  7. Q&A example: cyclic bitstrings Def. A cyclic bitstring is a cycle of bits 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1 C 1 = 2 1 0 1 1 0 0 1 C 3 = 4 1 0 1 1 C 2 = 3 1 0 C 4 = 6 C 5 = 8 Q. How many N -bit cyclic bitstrings ? 8

  8. Q&A example: cyclic bitstrings Q. How many N -bit cyclic bitstrings ? 0 1 One possibility 0 0 1 1 • Solution is “easy”. • Create an exam question with appropriate hints. 0 1 0 1 Another possibility 1 0 0 1 • Solution is “difficult” or “complicated”. 0 1 • Figure out a way to simplify. 0 0 • Or, think about a different problem. 1 0 1 1 1 0 Third possibility • Problem you thought of is a “classic”. C 4 = 6 • Use OEIS. 9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend