Multiset/Set/List initiation and use in pseudocode

469 Views Asked by At

I'm writing a paper and I've come across interesting problem. In my algorithm, I create a list of 0's (example [0,0,0,0]), where the number of 0's is given by parameter "x". Later I want to update these values using argmin to get the smallest member of this set/list and assign it new value. The problem is how to succinctly describe the creation of such set/list in pseudocode, i.e., mathematical notation.

From what I know, I can't use set, since there are duplicate elements. List have nonstandard notation of add operation and they look weird and there is no notation like "Set-builder" for sets to make the creation of starting list of zeroes in one line. Multi-sets are not very distinguishable from actual sets in notation, which makes it bit confusing for the reader, not mentioning that "Set-builder" notation does not contain what I need to describe it anyway.

I just can't figure out a good way how to deal with this problem.

1

There are 1 best solutions below

0
On

So my current solution to this problem is as follows:

$MultisetOfZeroes \gets \{0\} \rightarrow x$

I'm not sure if it is correct however if I understood this answer correctly it should be applicable like that.