Community

Want to learn how to tackle those tough AMC/AIME/Olympiad algebra problems? Check out Art of Problem Solving's Intermediate Algebra by Richard Rusczyk and Mathew Crawford. Over 1600 problems!
Login Register Memberlist Search AoPS Blogs Contests Galleries Forum Index
The time now is Fri Nov 20, 2009 11:39 pm
All times are UTC - 8
View posts since last visit
View unanswered posts
Strings on [n] with certain restrictions
Moderators: High School Olympiad Moderators, darij grinberg, freemind, Megus, N.T.TUAN, orl, pbornsztein
Post new topic   Reply to topic View previous topicView next topic
4 Posts • Page 1 of 1
Author Message
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 04 Jul 2003
Posts: 10744
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#1
Strings on [n] with certain restrictions

Compute the number of strings of length k with entries in [n] = \{1, 2, \ldots, n\} such that between any two occurrences of the letter i there is an occurrence of a letter strictly larger than i.

For example, with n = 3 and k = 3 there are 9 such strings: 121, 131, 232 and the six permutations of 123.

I don't know a solution, so in particular I don't know whether there is a nice answer Embarassed. So, if you can say anything else interesting about these sequences .... (An easy statement: k \leq 2^n - 1, with a single string when k = 2^n - 1.)

Edit: Conjecture: this is the same as A122888 in the OEIS.

Later edit: the conjecture is true. Let f(n, k) be the number of such strings of length k on [n]. I claim that this is the coefficient of x^{k + 1} in the n-fold composition of g(x) = x + x^2 with itself. For n = 1 this is clear: there is one string of length 0 and one of length 1 and no others. Now, we show that they obey the same recursion. By polynomial arithmetic,
\begin{align*} [x^{k + 1}] g^{(n)}(x) & = [x^{k + 1}]g^{(n - 1)}(x) + [x^{k + 1}]\left(g^{(n - 1)}(x)\right)^2 \\
& =... where [x^*] is a coefficient extractor. On the other hand we have
f(n, k) = f(n - 1, k) + \sum_{i = 0}^{k - 1}f(n - 1, i)\cdot f(n - 1, k - i)
because the first term counts strings in which n does not appear while the second term counts strings in which n does appear. (The latter is true because when n appears, exactly one copy is present and the substrings of our original string to the left and right of this copy of n can be any valid strings on [n - 1].)
_________________
Joel
Hi Deeps! <3

PostPosted: Tue May 06, 2008 9:17 am  Back to top 
  ProfilePMWWW
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 04 Jul 2003
Posts: 10744
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#2
Follow-up: how many strings are there of length k with entries in [n] such that between any two occurrences of the letter i there is an occurrence of i + 1?

Or, as a special case: now we have that k \leq \frac {n(n + 1)}{2}. How many strings of length \frac{n(n + 1)}{2} are there with entries in [n] such that between any two occurrences of the letter i there is an occurrence of i + 1?
_________________
Joel
Hi Deeps! <3

PostPosted: Tue May 12, 2009 11:57 am  Back to top 
  ProfilePMWWW
darij grinberg
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 10 Feb 2004
Posts: 5763
Location: Karlsruhe / Munich

To rate posts you must be logged in
#3
JBL wrote:
Or, as a special case: now we have that k \leq \frac {n(n + 1)}{2}. How many strings of length \frac {n(n + 1)}{2} are there with entries in [n] such that between any two occurrences of the letter i there is an occurrence of i + 1?


This appears, with the same description (among others), in http://www.research.att.com/~njas/sequences/A003121 .

Nice result!@first post

darij
_________________
Now the die is cast, the first step taken, a glimmer of hope lights up our lives
Visions of the past, dreams forsaken forming right under our eyes
We are alive...

PostPosted: Tue May 12, 2009 4:35 pm  Back to top 
  ProfilePMWWW
JBL
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 04 Jul 2003
Posts: 10744
Location: Brooklyn, NY or Cambridge, MA
United States

To rate posts you must be logged in
#4
Thanks and thanks! A reasonably nice formula with some other good combinatorial interpretations -- so it seems still possible that there is a nice formula of some sort.
_________________
Joel
Hi Deeps! <3

PostPosted: Thu May 14, 2009 6:17 pm  Back to top 
  ProfilePMWWW
Display posts from previous:   Sort by:   
4 Posts • Page 1 of 1
Post new topic   Reply to topic View previous topicView next topic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
You cannot post calendar events in this forum


© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us