дискретная-математика

The problem of triangulating a polygon

A polygon is defined by the coordinates of its vertices along the circumference of its contour. You need to specify a set of ... to check whether a straight line (or a point) belongs to a polygon and which points to connect if the polygon is non-convex.

How to implement the generation of placements without repetitions?

How best to implement the permutate function with the signature (JavaScript) const array = ['a', 'b', 'c']; const k = 2; co ... expected return value: const permutations = [ ['a', 'b'], ['b', 'a'], ['b', 'c'], ['c', 'b'], ['a', 'c'], ['c', 'a'] ];

Matching text and html. Search for a position

There is a text and its html version: Once upon a time there was a very rich man who lived with his three daughters. The tw ... h makes it difficult to find I tried to listen for shifts using the Levenshtein distance, but this is a very "heavy" solution

Simplify the view of the set

To simplify the form of a set given by operations, applying the laws of set algebra (the answer sets can enter no more than once): (A ∩ B)∆(¯A ∩ B) What's next? Can I take B and move to left B?

integral calculation, discrete mathematics

I need to calculate the integral. The area G bounded by the circle x[SUP]2 [/SUP]+y[SUP]2[/SUP] #include<iostream> #inc ... < " experimentov i a = " << a << " polucili integral = " << (1. / n) * area_d * summa; return 0; }

Non-reflexive, symmetric, transitive binary relation

Give an example of a binary relation R ⊂ A × A, where A = {a, b, c,d, e}, which is non-reflexive, symmetric, transitive, and construct its matrix.

Write down the problem condition using logic algebra

Please help me write down the condition of the problem using the algebra of logic. The three daughters of the writer Doris Ka ... = 1 General formula: G ^ (B C)^ (I ^ (A C ))^ A ^ (D ˅ E) ^ (B ^ D) ^ I ^ (D ˅ F) = 1 I do not exclude that I wrote nonsense

Can you recommend books on discrete mathematics? [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... e is a chance to spend time on "mediocre reading". Please advise the books + author based on your personal reading practice.

Help me describe an algorithm written in C++, in the great and mighty

I searched the web in search of an algorithm for checking a boolean function for monotony, unfortunately, I found it only in C++, but I don't know it myself. I would be very grateful if you describe the teapot in an accessible language.

Do you need an algorithm for splitting a natural number n into m parts (zeros are also included) or at least a sketch?

There is an algorithm, but it is not clear and not clear: Generating compositions of a natural number n by a given rank m me ... he first zero element b[i] from right to left and replace it with one, and erase all elements to the right of it to zero. end