It is an exercise I meet in the book Discrete Mathematics Fifth Edition written by Richard.It is on page 184.It is not my homework!I just learned it by myself but I can't catch up with the solution to this problem.So thanks for helping me !It is something like this:
The pseudocede is like this :(note that "in" is just $i_n$ and n is bigger than 0 I think)
for i1: = 1 to n do for i2: = 1 to min(i1 ,n-1) do for i3: = 1 to min(i2,n-2) do ... for in-1 := 1 to min(in-2,2) do for in := 1 to 1 do print i1,i2,i3,...,in
Show that print statement is executed $C_n$ times,where $C_n$ denotes the $n$th Catalan number.
I will appreciate it if you can help me!Thanks!