Week 92 of 145 ยท TAOCP Vol 3: Sorting and Searching

TAOCP 5.1.3 Runs

2 tasks, 4 steps. Open a task's steps to see exactly what to do; each guide has the detail.

Sign up or sign in to tick these off and give this week a due date.

By the end of this week you can

  • Compute the ascending runs of a permutation.
  • Use the Eulerian number recurrence to count permutations by runs.
  • Recognize the difference between ascending runs and alternating runs.

Week 92 ยท Self-check

Three quick questions

Ungraded, and it never holds anything up. Pick an answer to see why.

  1. How many ascending runs does 3 5 2 4 6 1 have?
  2. How many permutations of {1, 2, 3, 4} have exactly 2 ascending runs?
  3. In a long random permutation, about how long is an ascending run on average?

Nothing is saved while signed out.

Discussion

0 posts

Stuck on week 92, or finished early? Say what you tried and what happened. Hints over answers: full solutions go in a spoiler.

No posts yet. Ask a question or share a tip.

Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Spot a mistake? Report it