Questions tagged [pattern-matching]

For questions about pattern matching in computer science, which is the act of checking a given sequence of tokens for the presence of the constituents of some pattern.

In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually has to be exact: "either it will or will not be a match." The patterns generally have the form of either sequences or tree structures. Uses of pattern matching include outputting the locations (if any) of a pattern within a token sequence, to output some component of the matched pattern, and to substitute the matching pattern with some other token sequence (i.e., search and replace).

59 questions
1
vote
3 answers

Finding the equation pattern of a known set

I have the numbers 1 - 100, when they are put into a box (an abstracted code function I do not know the details of), they come out as 0 = 1 1 = 4 2 = 6 3 = 9 4 = 11 5 = 14 6 = 16 7 = 19 8 = 21 9 = 24 10 = 26 11 = 29 12 = 31 13 = 34 14 = 36 15 =…
cgmckeever
  • 113
  • 4
0
votes
0 answers

Determining the importance of items across sets?

There's a better term for it. Let's say i have a suite of sets - A, B, C, D. Each set contains any number, in a non-important order, of items - 1,2,3,4,5,6 The items may occur any number (0 or more) of times in a set. Is there some agreed-upon…
bharal
  • 321