How can I know the length of sublists in a code without running the code?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I have a list called eaData
which contains sublists of the form a,b, number, where each sublist gives the number of steps in the Euclidean algorithm for numbers $a$ and $b$.
I have the following code:
eaSteps[a_, b_] :=
NestWhileList[
#[[2]], Mod[#[[1]], #[[2]]] &,
a, b,
#[[2]] != 0 &
]
So for example
eaSteps[1736, 1333] = 1736,1333,1333,403,403,124,124,31,31,0`
I also have
eaData =
SortBy[
Flatten[
Table[
a, b, Length[eaSteps[a, b]] - 1,
a, 1, 100,
b, 1, a(* the b value cannot exceed the a value *)
],
1
],
Part[#,3] &
]
My question is that my eaData
list contains 5050 sublists. How could I know there are 5050 subentries before I even run the code?
I know that for the EA, the maximum number of steps is at most 5 times the minimum number of digits of either a or b, how does that help me here?
And if $b leq a leq 1000$ then how can I find the a and b values that require the most steps in the EA?
I'm thinking that I know a has at most 4 digits, so there are at most 20, steps. But now I'm stuck. Any help? thank you!
list-manipulation
New contributor
add a comment |Â
up vote
4
down vote
favorite
I have a list called eaData
which contains sublists of the form a,b, number, where each sublist gives the number of steps in the Euclidean algorithm for numbers $a$ and $b$.
I have the following code:
eaSteps[a_, b_] :=
NestWhileList[
#[[2]], Mod[#[[1]], #[[2]]] &,
a, b,
#[[2]] != 0 &
]
So for example
eaSteps[1736, 1333] = 1736,1333,1333,403,403,124,124,31,31,0`
I also have
eaData =
SortBy[
Flatten[
Table[
a, b, Length[eaSteps[a, b]] - 1,
a, 1, 100,
b, 1, a(* the b value cannot exceed the a value *)
],
1
],
Part[#,3] &
]
My question is that my eaData
list contains 5050 sublists. How could I know there are 5050 subentries before I even run the code?
I know that for the EA, the maximum number of steps is at most 5 times the minimum number of digits of either a or b, how does that help me here?
And if $b leq a leq 1000$ then how can I find the a and b values that require the most steps in the EA?
I'm thinking that I know a has at most 4 digits, so there are at most 20, steps. But now I'm stuck. Any help? thank you!
list-manipulation
New contributor
shouldn't you changea, 1, 25
toa, 1, 100
to get 5050 sublists?
â kglr
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I have a list called eaData
which contains sublists of the form a,b, number, where each sublist gives the number of steps in the Euclidean algorithm for numbers $a$ and $b$.
I have the following code:
eaSteps[a_, b_] :=
NestWhileList[
#[[2]], Mod[#[[1]], #[[2]]] &,
a, b,
#[[2]] != 0 &
]
So for example
eaSteps[1736, 1333] = 1736,1333,1333,403,403,124,124,31,31,0`
I also have
eaData =
SortBy[
Flatten[
Table[
a, b, Length[eaSteps[a, b]] - 1,
a, 1, 100,
b, 1, a(* the b value cannot exceed the a value *)
],
1
],
Part[#,3] &
]
My question is that my eaData
list contains 5050 sublists. How could I know there are 5050 subentries before I even run the code?
I know that for the EA, the maximum number of steps is at most 5 times the minimum number of digits of either a or b, how does that help me here?
And if $b leq a leq 1000$ then how can I find the a and b values that require the most steps in the EA?
I'm thinking that I know a has at most 4 digits, so there are at most 20, steps. But now I'm stuck. Any help? thank you!
list-manipulation
New contributor
I have a list called eaData
which contains sublists of the form a,b, number, where each sublist gives the number of steps in the Euclidean algorithm for numbers $a$ and $b$.
I have the following code:
eaSteps[a_, b_] :=
NestWhileList[
#[[2]], Mod[#[[1]], #[[2]]] &,
a, b,
#[[2]] != 0 &
]
So for example
eaSteps[1736, 1333] = 1736,1333,1333,403,403,124,124,31,31,0`
I also have
eaData =
SortBy[
Flatten[
Table[
a, b, Length[eaSteps[a, b]] - 1,
a, 1, 100,
b, 1, a(* the b value cannot exceed the a value *)
],
1
],
Part[#,3] &
]
My question is that my eaData
list contains 5050 sublists. How could I know there are 5050 subentries before I even run the code?
I know that for the EA, the maximum number of steps is at most 5 times the minimum number of digits of either a or b, how does that help me here?
And if $b leq a leq 1000$ then how can I find the a and b values that require the most steps in the EA?
I'm thinking that I know a has at most 4 digits, so there are at most 20, steps. But now I'm stuck. Any help? thank you!
list-manipulation
list-manipulation
New contributor
New contributor
edited 1 hour ago
kglr
167k8188390
167k8188390
New contributor
asked 4 hours ago
user130306
233
233
New contributor
New contributor
shouldn't you changea, 1, 25
toa, 1, 100
to get 5050 sublists?
â kglr
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago
add a comment |Â
shouldn't you changea, 1, 25
toa, 1, 100
to get 5050 sublists?
â kglr
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago
shouldn't you change
a, 1, 25
to a, 1, 100
to get 5050 sublists?â kglr
4 hours ago
shouldn't you change
a, 1, 25
to a, 1, 100
to get 5050 sublists?â kglr
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Update: FWIW it is also possible to find a pair of numbers a, b
less than n
with maximum length for the sequence eaSteps[a,b]
without "running the code". It seems that Fibonacci
sequence can be used to identify the pairs with maximum eaSteps
length (I have no idea why though):
ClearAll[maxEALengthPair]
maxEALengthPair[n_] := Module[i = 0, While[Fibonacci[++i] < n]; Fibonacci[i-1, i-2]];
TeXForm @ Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair",
#, maxEALengthPair /@ # &@50, 100, 500, 1000, 10000, 100000, 1000000, 10^7],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 & 10000 & 100000 & 1000000 & 10000000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 & 6765,4181 & 75025,46368 & 832040,514229 &
9227465,5702887 \
hline
endarray$
Brute-force approach gives the same results for n â 50, 100, 500, 1000
:
nl = 50, 100, 500, 1000 ;
#, MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ #&@nl
Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair", #,
MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ # &@nl],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 \
hline
endarray$
Note: For some n
, there are multiple pairs with maximum eaSteps
length. For example, for n=50
there are 7 pairs that give a length 7 list:
MaximalBy[Reverse /@ Subsets[Range[50], 2], Length[eaSteps[#]] &]
34, 21, 47, 29, 50, 29, 49, 30, 49, 31, 50, 31, 47,
34
Length[eaSteps @ #] - 1 &/@ %
7, 7, 7, 7, 7, 7, 7
The table above gives only the first of multiple pairs.
Original answer:
You can get the length of Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1]
using
n (n + 1)/2
(which is Sum[1, i, 1, n, j, 1, i]
)
or
Length[Subsets[Range[n], 1, 2]]
For n = 100
:
100 101 /2
5050
Length[Subsets[Range[100], 1, 2]]
5050
table[n_Integer] := Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1];
Length[table[100]]
5050
For the second part of the question, using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
987, 610
Length[Length[eaSteps[987, 610]]] -1
14
thank you! so basically the reason I would know its 5050 before I even run the code is if I useSubsets
right?
â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approachMaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give987, 610
andLength[eaSteps[987, 610]]
gives 15.
â kglr
2 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Update: FWIW it is also possible to find a pair of numbers a, b
less than n
with maximum length for the sequence eaSteps[a,b]
without "running the code". It seems that Fibonacci
sequence can be used to identify the pairs with maximum eaSteps
length (I have no idea why though):
ClearAll[maxEALengthPair]
maxEALengthPair[n_] := Module[i = 0, While[Fibonacci[++i] < n]; Fibonacci[i-1, i-2]];
TeXForm @ Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair",
#, maxEALengthPair /@ # &@50, 100, 500, 1000, 10000, 100000, 1000000, 10^7],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 & 10000 & 100000 & 1000000 & 10000000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 & 6765,4181 & 75025,46368 & 832040,514229 &
9227465,5702887 \
hline
endarray$
Brute-force approach gives the same results for n â 50, 100, 500, 1000
:
nl = 50, 100, 500, 1000 ;
#, MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ #&@nl
Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair", #,
MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ # &@nl],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 \
hline
endarray$
Note: For some n
, there are multiple pairs with maximum eaSteps
length. For example, for n=50
there are 7 pairs that give a length 7 list:
MaximalBy[Reverse /@ Subsets[Range[50], 2], Length[eaSteps[#]] &]
34, 21, 47, 29, 50, 29, 49, 30, 49, 31, 50, 31, 47,
34
Length[eaSteps @ #] - 1 &/@ %
7, 7, 7, 7, 7, 7, 7
The table above gives only the first of multiple pairs.
Original answer:
You can get the length of Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1]
using
n (n + 1)/2
(which is Sum[1, i, 1, n, j, 1, i]
)
or
Length[Subsets[Range[n], 1, 2]]
For n = 100
:
100 101 /2
5050
Length[Subsets[Range[100], 1, 2]]
5050
table[n_Integer] := Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1];
Length[table[100]]
5050
For the second part of the question, using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
987, 610
Length[Length[eaSteps[987, 610]]] -1
14
thank you! so basically the reason I would know its 5050 before I even run the code is if I useSubsets
right?
â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approachMaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give987, 610
andLength[eaSteps[987, 610]]
gives 15.
â kglr
2 hours ago
add a comment |Â
up vote
2
down vote
accepted
Update: FWIW it is also possible to find a pair of numbers a, b
less than n
with maximum length for the sequence eaSteps[a,b]
without "running the code". It seems that Fibonacci
sequence can be used to identify the pairs with maximum eaSteps
length (I have no idea why though):
ClearAll[maxEALengthPair]
maxEALengthPair[n_] := Module[i = 0, While[Fibonacci[++i] < n]; Fibonacci[i-1, i-2]];
TeXForm @ Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair",
#, maxEALengthPair /@ # &@50, 100, 500, 1000, 10000, 100000, 1000000, 10^7],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 & 10000 & 100000 & 1000000 & 10000000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 & 6765,4181 & 75025,46368 & 832040,514229 &
9227465,5702887 \
hline
endarray$
Brute-force approach gives the same results for n â 50, 100, 500, 1000
:
nl = 50, 100, 500, 1000 ;
#, MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ #&@nl
Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair", #,
MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ # &@nl],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 \
hline
endarray$
Note: For some n
, there are multiple pairs with maximum eaSteps
length. For example, for n=50
there are 7 pairs that give a length 7 list:
MaximalBy[Reverse /@ Subsets[Range[50], 2], Length[eaSteps[#]] &]
34, 21, 47, 29, 50, 29, 49, 30, 49, 31, 50, 31, 47,
34
Length[eaSteps @ #] - 1 &/@ %
7, 7, 7, 7, 7, 7, 7
The table above gives only the first of multiple pairs.
Original answer:
You can get the length of Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1]
using
n (n + 1)/2
(which is Sum[1, i, 1, n, j, 1, i]
)
or
Length[Subsets[Range[n], 1, 2]]
For n = 100
:
100 101 /2
5050
Length[Subsets[Range[100], 1, 2]]
5050
table[n_Integer] := Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1];
Length[table[100]]
5050
For the second part of the question, using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
987, 610
Length[Length[eaSteps[987, 610]]] -1
14
thank you! so basically the reason I would know its 5050 before I even run the code is if I useSubsets
right?
â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approachMaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give987, 610
andLength[eaSteps[987, 610]]
gives 15.
â kglr
2 hours ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Update: FWIW it is also possible to find a pair of numbers a, b
less than n
with maximum length for the sequence eaSteps[a,b]
without "running the code". It seems that Fibonacci
sequence can be used to identify the pairs with maximum eaSteps
length (I have no idea why though):
ClearAll[maxEALengthPair]
maxEALengthPair[n_] := Module[i = 0, While[Fibonacci[++i] < n]; Fibonacci[i-1, i-2]];
TeXForm @ Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair",
#, maxEALengthPair /@ # &@50, 100, 500, 1000, 10000, 100000, 1000000, 10^7],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 & 10000 & 100000 & 1000000 & 10000000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 & 6765,4181 & 75025,46368 & 832040,514229 &
9227465,5702887 \
hline
endarray$
Brute-force approach gives the same results for n â 50, 100, 500, 1000
:
nl = 50, 100, 500, 1000 ;
#, MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ #&@nl
Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair", #,
MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ # &@nl],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 \
hline
endarray$
Note: For some n
, there are multiple pairs with maximum eaSteps
length. For example, for n=50
there are 7 pairs that give a length 7 list:
MaximalBy[Reverse /@ Subsets[Range[50], 2], Length[eaSteps[#]] &]
34, 21, 47, 29, 50, 29, 49, 30, 49, 31, 50, 31, 47,
34
Length[eaSteps @ #] - 1 &/@ %
7, 7, 7, 7, 7, 7, 7
The table above gives only the first of multiple pairs.
Original answer:
You can get the length of Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1]
using
n (n + 1)/2
(which is Sum[1, i, 1, n, j, 1, i]
)
or
Length[Subsets[Range[n], 1, 2]]
For n = 100
:
100 101 /2
5050
Length[Subsets[Range[100], 1, 2]]
5050
table[n_Integer] := Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1];
Length[table[100]]
5050
For the second part of the question, using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
987, 610
Length[Length[eaSteps[987, 610]]] -1
14
Update: FWIW it is also possible to find a pair of numbers a, b
less than n
with maximum length for the sequence eaSteps[a,b]
without "running the code". It seems that Fibonacci
sequence can be used to identify the pairs with maximum eaSteps
length (I have no idea why though):
ClearAll[maxEALengthPair]
maxEALengthPair[n_] := Module[i = 0, While[Fibonacci[++i] < n]; Fibonacci[i-1, i-2]];
TeXForm @ Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair",
#, maxEALengthPair /@ # &@50, 100, 500, 1000, 10000, 100000, 1000000, 10^7],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 & 10000 & 100000 & 1000000 & 10000000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 & 6765,4181 & 75025,46368 & 832040,514229 &
9227465,5702887 \
hline
endarray$
Brute-force approach gives the same results for n â 50, 100, 500, 1000
:
nl = 50, 100, 500, 1000 ;
#, MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ #&@nl
Grid[#, ## & @@ #2 & @@@ Transpose["n", "pair", #,
MaximalBy[Reverse /@ Subsets[Range[#], 2], Length[eaSteps[#]] &][[1]] & /@ # &@nl],
Dividers -> All]
$tinybeginarrayc
hline
textn & 50 & 100 & 500 & 1000 \
hline
textpair & 34,21 & 89,55 & 377,233 & 987,610 \
hline
endarray$
Note: For some n
, there are multiple pairs with maximum eaSteps
length. For example, for n=50
there are 7 pairs that give a length 7 list:
MaximalBy[Reverse /@ Subsets[Range[50], 2], Length[eaSteps[#]] &]
34, 21, 47, 29, 50, 29, 49, 30, 49, 31, 50, 31, 47,
34
Length[eaSteps @ #] - 1 &/@ %
7, 7, 7, 7, 7, 7, 7
The table above gives only the first of multiple pairs.
Original answer:
You can get the length of Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1]
using
n (n + 1)/2
(which is Sum[1, i, 1, n, j, 1, i]
)
or
Length[Subsets[Range[n], 1, 2]]
For n = 100
:
100 101 /2
5050
Length[Subsets[Range[100], 1, 2]]
5050
table[n_Integer] := Flatten[Table[a, b, foo, a, 1, n, b, 1, a], 1];
Length[table[100]]
5050
For the second part of the question, using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
987, 610
Length[Length[eaSteps[987, 610]]] -1
14
edited 29 mins ago
answered 3 hours ago
kglr
167k8188390
167k8188390
thank you! so basically the reason I would know its 5050 before I even run the code is if I useSubsets
right?
â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approachMaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give987, 610
andLength[eaSteps[987, 610]]
gives 15.
â kglr
2 hours ago
add a comment |Â
thank you! so basically the reason I would know its 5050 before I even run the code is if I useSubsets
right?
â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approachMaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give987, 610
andLength[eaSteps[987, 610]]
gives 15.
â kglr
2 hours ago
thank you! so basically the reason I would know its 5050 before I even run the code is if I use
Subsets
right?â user130306
3 hours ago
thank you! so basically the reason I would know its 5050 before I even run the code is if I use
Subsets
right?â user130306
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
@user130306, that's correct.
â kglr
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
great, thank you again. and for the second part of the question, do the values a = 987, b = 610, n = 14 work and is that the right answer?
â user130306
3 hours ago
using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give 987, 610
and Length[eaSteps[987, 610]]
gives 15.â kglr
2 hours ago
using a brute force approach
MaximalBy[Reverse/@Subsets[Range[1000],2], Length[eaSteps[#]]&]
does give 987, 610
and Length[eaSteps[987, 610]]
gives 15.â kglr
2 hours ago
add a comment |Â
user130306 is a new contributor. Be nice, and check out our Code of Conduct.
user130306 is a new contributor. Be nice, and check out our Code of Conduct.
user130306 is a new contributor. Be nice, and check out our Code of Conduct.
user130306 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f184366%2fhow-can-i-know-the-length-of-sublists-in-a-code-without-running-the-code%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
shouldn't you change
a, 1, 25
toa, 1, 100
to get 5050 sublists?â kglr
4 hours ago
yes sorry, I meant a,1,100, i just mean, how do I know without running the code itself that I'd get 5050. what is the logic behind it?
â user130306
4 hours ago