#Please do not post homework #Guy Adami, 2026-03-08, Assignment 13 #____________ Park:=proc(n,k) local S,k1,S1,s1: option remember: if nL[i+1] then L1:=[op(1..i-1,L),L[i]-1,op(i+1..k,L)]: S1:=SYT(L1): S:=S union {seq( [op(1..i-1,s1),[op(s1[i]),n],op(i+1..k,s1)] , s1 in S1)}: fi: od: if L[k]>1 then L1:=[op(1..k-1,L),L[k]-1]: S1:=SYT(L1): S:=S union {seq( [op(1..k-1,s1),[op(s1[k]),n]] ,s1 in S1)}: else L1:=[op(1..k-1,L)]: S1:=SYT(L1): S:=S union {seq([op(1..k-1,s1), [n]] ,s1 in S1)}: fi: S: end: #________________________ #Question 1 IsSuperDistinct:= proc(L,d) local i,co: co:= 0: for i from 1 to nops(L)-1 do: if L[i] - L[i+1] < d then co:= co+1: fi: od: if co>0 then RETURN(false): else RETURN(true): fi: end: #------ SuperDistinctPars := proc(n,d) local P, p,SDP: P:=Par(n): SDP:={}: for p in P do if IsSuperDistinct(p,d) = true then SDP:= {op(SDP),p}: fi: od: SDP; end: #________________________ #Question 2 ParMod:=proc(n,a,A) local P,p,PM: PM:={}: P:=Par(n): for p in P do if {op(p)} mod a subset A then PM:= {op(PM),p}: fi: od: PM; end: #________________________ #Question 3 # seq(nops(SuperDistinct(n,2))) = A003114 # seq(nops(ParMod(n,5,{1,4}))) = A003114 #First 20 terms: [1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 12, 14, 17, 19, 23, 26, 31] #________________________ #Question 4 #This method is kind of cheating because I know of a method to determine the dimensionality of a SYT using boxes. #Where for each square of the tableaux is labeled with an (i,j) coordinate, the box value B of that coordinate is # B = nops(all coordinates directly to the right) + nops(all coordinates directly below) (including itself)) #The dimensionality is equal to n!/prod(all box values) NuSYT := proc(L) local n, i, j, k, brow, bcol, b, B: n := add(L): B := []: for j to nops(L) do for i to L[j] do brow := L[j] - i: bcol := 0: for k from j to nops(L) do if i <= L[k] then bcol := bcol + 1: fi: od: B := [op(B), brow + bcol]: od: od: n!/mul(B[b], b = 1 .. nops(B)); end: