http://poj.org/problem?id=2417a^x = B (mod C), known as a, a. C. Find X.Here c is a prime number and can be used with ordinary baby_step.In the process of finding the smallest x, set X to I*m+j. The original becomes a^m^i * a^j = b (mod c), D = A^m, then d^i * a^j = b (mod c),Pre-a^j into the hash table, and then enumerate I (0~m-1), according to the expansion of Euclid to find out a^j. Then go to the hash table to find the corresponding J, then x = I*m+j.Determine if x has a solution, which is
Discrete Mathematics FiveThe use of the primary disjunction paradigm1. To find the formula of the true assignment and false assignment value.2. Determine the type of formula. It is a tautology, a contradiction or a satisfying formula.3. Determine whether the two proposition formulas are equivalent.Example: Use the main disjunctive paradigm of a formula to determine the type of formula described below:If there are n propositional changes in formula A,
Just one shot. The probability of a bullet is a conditional probability, equal to the number of substrings 00 divided by 00 and 01 total (that is, the number of 0), the probability of the transfer of the bullet is equal to 0 of the ratio.The number of substring 00 is a,0 B, then two probabilities are A/b and b/n respectively, the problem is to compare a*n and b*b.#include Uva1636-headshot (discrete probability)
voidinitfmn () the {Bayi DoubleFirstm =1/math.sqrt (row); the DoubleFIRSTN =1/math.sqrt (col); the for(inti =0; i ) - { - for(intj =0; J ) the { the if(i = =0) the { theFm[i, J] =firstm; - } the Else the { theFm[i, J] = Math.sqrt (2.0/row) * Math.Cos (i * j * Math.PI/row);94 } the
Solution report
Question Portal
Question:
Calculates the rectangle and area.
Ideas:
Discrete + line segment tree + scanned line.
#include
Atlanta
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 6942 accepted submission (s): 3046
Problem descriptionthere are several generated ent Greek texts that contain descriptions of the fabled island Atlanta. some of these texts even include maps of parts of
HDU 4638 Group (offline algorithm | discrete line segment tree query), hdu4638
Address: HDU 4638First, I wrote a letter to the MO team. It's very simple.The Code is as follows:
#include
Then I read the question report and found that the line segment tree and offline query can also be used. And it's amazing ..First, save it offline. Maintenance is performed from left to right to maintain the relative number of the previous values for the current enum
[Discrete logarithm] ultraviolet A 11916 Emoogle Grid
Question:
Apply K colors to an M * N matrix.
There are B cells that cannot be colored, and each cell cannot be the same color as the cell above.
If N and total result R are known, find the row M with the minimum satisfaction.
All data has a modulo value of 100,000,007.
Ideas:
Because the X coordinates of the input vertex that cannot be colored must be within M. So record maxX.
Divide the entire mat
;>Y2; Ax[k]=X1; +S[k++]=seg (X1,x2,y1,1); thex[k]=x2; -S[k++]=seg (x1,x2,y2,-1); $ } theSort (x,x+k); theSort (s,s+k); the intt = unique (x, x+k)-x; the Doubleans=0; - in for(intI=0; i//Scan Segments the intPOS1 =Bin_search (s[i].x1, t); the /* About This is because it is understood to be a legal line segment, so the right-most point is the first I-dot, corresponding to the first i-1 edge the Similarly, in Updatecur, the calculation of th
the paging system; it consists of two parts: page number P and page displacement W, that is, the address on the page;
(3) continuous allocation forms many "fragments". To reduce fragments and improve memory utilization, the discrete allocation mode is introduced;(4) paging system memory management: the system address is changed by querying the page table;
(5)
(6) It indicates the address conversion mechanism of the paging system. The address conve
Link to the question: Ultraviolet A 1426-discrete square roots
Returns X, N, R, and returns all satisfied R, so that R2 returns X % N, and R is a solution.
Solution:
R2? R2 = K? N
(R? R) (R + R) = K? N
=> AA = (R + r), BB = (r? R), A, and B are the factors of N.So if we enumerate a and B, r = r? AA = BB? R
AA + BB = 2? RExpand the Euclidean solution and free all satisfied items into the set to automatically remove duplicates.
#include
Recently in the study of Artificial neural network (Artificial neural netwroks), make notes, organize ideas
Discrete single output perceptron algorithm, the legendary MP
Two-valued Network: The value of the independent variable and its function, the value of the vector component only takes 0 and 1 functions, vectors
Weight vector: w= (W1,W2,W3.....WN)
Input vector: x= (X1,X2,X3.....XN)
Training Sample Set
{(x,y) | Y is the output of input vector
Perceptron is an early neural network model, presented by American scholar F.rosenblatt in 1957. Because the concept of learning was introduced for the first time in Perceptron, the learning function possessed by the human brain was simulated in a mathematical model based on symbolic processing, so it aroused a wide concern.
The simple Perceptron model is still the structure of the M-P model, but it can gradually enhance the ability of the pattern division by using supervised learning to achie
Timus 1010. The discrete function requires that the given discrete function be used to locate the greatest dip in the line of the corresponding point in the Cartesian coordinate system.
1010. discrete function
Time Limit: 1.0 secondMemory limit: 16 MBThere is a discrete function. It is specified for integer arguments
How to automatically draw contour lines (contour lines) based on discrete points: Triangle Method Introduction, contour lines
The automatic contour drawing method can be divided into two categories: Interpolation and curve fitting. in general, the effect of curve fitting is not as good as that of the classic and widely used interpolation algorithms, and the effect is also inferior. this section focuses on interpolation algorithms.
In the interpolati
Discrete variable refers to the variable can only take discrete isolated values, usually by the number of units of measurement, such as number, number of units. Many of the distributions of discrete variables are related to last, so let's take a look at the last experiment:In the same condition, repeated and independent experiments of each other have become last.
??Recently, when implementing algorithms. Feel the lack of knowledge of mathematics, here-------------------------------------------------- calculus --------------------------------------------- -------------Calculus Open Class:mit: univariate calculushttp://ocw.mit.edu/courses/mathematics/18-01sc-single-variable-calculus-fall-2010/Http://v.163.com/special/sp/singlevariablecalculus.htmlmit: Many variable CalculusHttp://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/inde
Recently in the implementation of the algorithm, the feeling of lack of knowledge of mathematics, here-------------------------------------------------- calculus --------------------------------------------- -------------Calculus Open Class:mit: univariate calculushttp://ocw.mit.edu/courses/mathematics/18-01sc-single-variable-calculus-fall-2010/Http://v.163.com/special/sp/singlevariablecalculus.htmlmit: Many variable CalculusHttp://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculu
The two-dimensional discrete Fourier transform of image (MxN) can transform the image from the spatial domain to the frequency domain, the spatial coordinates are represented by x, y in the space domain, the frequency domain is represented by u,v, and the formula of the two-dimensional discrete Fourier transform is as follows:In Python, the FFT module of the NumPy Library has a two-dimensional
Like the Fourier series and transformation of continuous signals, the two have the majority of similarities, but the most important difference is that the Fourier coefficient of discrete signals has a period, discrete Signals are split into a complex exponential signal, which is also cyclical. The reason for these phenomena is the difference between E ^ (jkwn) and E ^ (jkwt,
If x (n) = E ^ (jkwn) and X (t)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.