Skip to main content

Questions tagged [counting]

Questions on counting subparts of expressions, based on certain criteria. This is to be used with primary tags such as list-manipulation or string-manipulation, with the primary tag indicating the specific use case.

3 votes
1 answer
108 views

I browsed one enumerative combinatorics problem in Zhihu. This is also a problem on JAM October 2023. Proprosed by Erik Vigren. Swedish Institute of Space Physics, Uppsala, Sweden. Suppose that $k$ ...
138 Aspen's user avatar
  • 2,354
4 votes
5 answers
1k views

We roll 40 dice. What's the probability that their total sum is divisible by 17? My first thought was to see the range of all possible sums, which is 40 to 240, and extract all the multiples of 17 out ...
Steve237's user avatar
  • 1,747
5 votes
2 answers
348 views

In Mathematica I wrote the following code: ...
user avatar
0 votes
1 answer
104 views

I have a very long list of sublists, where one sublist looks like: 1 1 902 -1 1.013822E-04 0.000000E+00 0.000000E+00 0.000000E+00 1.130107E+00 -6.025446E-01 3.522072E-01 8.825352E-...
user3584513's user avatar
5 votes
3 answers
514 views

I have a list list = RandomInteger[{120, 180}, {20}] I want to count from the list elements $a$ satisfying conditions: $120\leqslant a <130$, $130\leqslant a &...
minhthien_2016's user avatar
2 votes
1 answer
183 views

Suppose we have some list of natural numbers $\{ 1, 2, \dots, N \}$ and each natural number $i$ has a 'weight' $w_i$. I would like to generate the all the integer partitions which satisfy the ...
MathPhysPlague's user avatar
1 vote
1 answer
71 views

I want to assign the first trial that appears as number 1 and the number of trials that appear from there as elements of the list, plus a number. At first, The following listA consisting of {a, b}. In ...
hare's user avatar
  • 446
7 votes
8 answers
606 views

Given a list with repeated elements, for example: list = {m, i, s, s, i, s, s, i, p, p, i} I'd like to determine, for each position in the list, how many times the ...
thecommexokid's user avatar
3 votes
4 answers
314 views

Background Info I am interested in a better way of doing the following: I want to find the weights of the following codewords (the weight of a codeword here can be defined as the number of nonzero ...
am567's user avatar
  • 997
6 votes
7 answers
563 views

I am trying to obtain a co-occurance matrix for pairs of names in a collection of groups of names. So, I have a collection of letters in small groups, such as ...
apg's user avatar
  • 2,303
0 votes
0 answers
106 views

I have a matrix, SpinOp, for which I obtain the Eigensystem using {evalSpinOp,evecSpinOp} = Eigensystem[SpinOp]. I need to ...
Nitin's user avatar
  • 431
8 votes
5 answers
356 views

I have a table of integers, say A, and consider the counting function C, which, for a given x, gives the number of elements in A which are less or equal to x. Next, I want to plot C(x) in some range, ...
Maciej Ulas's user avatar
4 votes
1 answer
537 views

I have a nested list of numbers, something like satisfied = {{1, 5, 6, 2, 1, 2}, {1, 5,,8, 6}, ..., {5, 6, 1}} and I want to count the number of occurences of 1 in each list. I know there is 1000 of ...
Ka Pe's user avatar
  • 43
2 votes
4 answers
380 views

I have a list of points pts that fluctuate around some mean line. pts is pre-sorted by the projection of the points onto this ...
az123p's user avatar
  • 239
4 votes
4 answers
311 views

Say I have a list like this ...
user824530's user avatar

15 30 50 per page
1
2 3 4 5
7