All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Sequence of Sets (Posted on 2017-07-30) Difficulty: 3 of 5

  
Design a sequence S0, S1, ... , S where each Si
   1) is a string of characters from the set
      {φ, "right brace", "left brace", comma} (φ denotes the empty set),
   2) denotes a valid set, and
   3) |Si| = i.

For clarity you can define substrings and use recursion.

Note; Si = {φ,{φ},{φ},φ,{φ,{φ}}} = {φ,{φ},{φ,{φ}}}
                |Si| = 3 not |Si| = 5.

Note: φ = {}. I don't know if this will help.

A possible start: S0 = φ , S1 = {φ} , ...
  
 

No Solution Yet Submitted by Bractals    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts One way Comment 1 of 1
S_0 = {}
S_1 = {{}}
S_2 = {{},{{}}}
S_3 = {{},{{}},{{{}}}}
S_4 = {{},{{}},{{{}}},{{{{}}}}}
...

Is that it? There are tons of ways to do it.

  Posted by JLo on 2020-01-23 09:07:44
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information