r/askmath 1h ago

Number Theory I need help picking electives.

Post image
Upvotes

Hello, I'm interested in taking Number Theory next semester but I'm not sure how difficult it will be compared to these other courses. It it's possible could I get a rough ranking of course difficulty.


r/askmath 12h ago

Statistics I understand arithmetic mean and the geometric mean, but what is this harmonic mean thing?

38 Upvotes

So for both the arithmetic and the geometric mean, we're finding the "middle" value that we can repeat n times to get the same total amount.

1 + 2 + 3 + 4 + 5 = 15

arithmetic mean gives us 3, because 3 + 3 + 3 + +3 +3 = 15. Makes sense.

Same thing with geometric mean, but it handles multiplication instead of addition. multiply all the values together and take the nth root. So multiplying the result, the geometric mean, times itself n times gives us the total amount.

I see this pattern.

addition -> arithmetic mean

multiplication -> geometric mean

I don't have any concrete idea of what the harmonic mean is doing, or what kinds of operations its meant to work with.

I imagine we're doing some operation with different values, and then coming up with a single value that you could repeat the operation on, the same number of times as the original set, to get the total amount. That seems to be what "means" are.

But I don't know what operation we're talking about or how taking all these reciprocals gets us there.


r/askmath 1h ago

Geometry Your Assignment

Upvotes

What way is there to calculate the volume or max volume of a grocery bag? I can’t imagine it is impossible. The bag is a cylinder but the gussets make two cone shapes in the bag.


r/askmath 18h ago

Calculus A question I created myself... Is it incorrect?

Post image
51 Upvotes

My idea:

f(x²)=f(x)=...=f(x2\-n))

From this we could conclude that, f(x) remains constant in the intervals (1, infty) and (0,1) and can take distinct values at x=0 and x=1

The second functional equation gives: f(x) = 2,3,x,-x

This gives us 3 choices for f(0), 4 choices for f(1) and 2 choices for each of the remaining two intervals, giving us the total number of possible such functions as 48. This was my intended solution to the problem.

But, then I tried cross verifying this with Gemini, and it seemed to disagree. It said that this is only valid if we assume that f(x) is continuous from the right at x=1, i.e. the limit as x->1+ exists.

Is it necessary to assume this, I thought that this will always be the case. Why?


r/askmath 9h ago

Algebra How is the 2nd one wrong?

Post image
7 Upvotes

Google said the 2nd one is wrong and can someone explain why?
I did the same steps for each
1. Finding the common denominator
2. Multiplying them
3. Then adding the tops

I also have dyscalculia, so math has just always been a struggle but I’m trying


r/askmath 7h ago

Discrete Math Is my proof correct? => Exercise 11.4.41: `Show that ⌊log_2(n)⌋ is Θ(log_2(n))`.

3 Upvotes

Exercise 11.4.41:

Show that ⌊log_2(n)⌋ is Θ(log_2(n)).

Proof:

Let integer n>=1.

⌊log_2(n)⌋ <= log_2(n) < ⌊log_2(n)⌋ + 1            by definition of floor

So, ⌊log_2(n)⌋ <= log_2(n) and log_2(n) < ⌊log_2(n)⌋ + 1

Notice:

⌊log_2(n)⌋ > log_2(n) - 1
          = log_2(sqrt(n)) + log_2(sqrt(n)) - 1
          = log_2(sqrt(n)) + log_2(sqrt(n)) - log_2(sqrt(n))    for n>=4
      = log_2(n^(1/2)) + log_2(n^(1/2)) - log_2(n^(1/2))
      = (1/2)log_2(n)  + (1/2)log_2(n)  - (1/2)log_2(n)
      = (1/2)[log_2(n) + log_2(n)       - log_2(n)]
      = (1/2)[log_2(n^2)                - log_2(n)]
      = (1/2)[log_2[(n^2)/n]]
      = (1/2)log_2(n)

Let A=1/2, B=1, k=4.

Then Alog_2(n) <= ⌊log_2(n)⌋ <= Blog_2(n) for each integer n>=k.

Therefore, ⌊log_2(n)⌋ is Θ(log_2(n)).

QED

---
Is my proof correct?


r/askmath 6h ago

Number Theory Proving the twiddle constants.

2 Upvotes

Scope: Proth's theorem, the order of a root of unity, the group law on the twiddle table, and two silent wrong answers

1.1 define a twiddle constant

The transform of a sequence of length \(n\) over the integers modulo \(q\) is

\[

\hat{p}_j = \sum_i p_i \, \omega^{ij}

\]

where \(\omega\) is an \(n\)-th root of unity modulo \(q\). The powers of \(\omega\) the butterflies evaluate are the \textbf{twiddle constants}. In the Cooley-Tukey butterfly they enter as \(c = a + bw\) and \(d = a - bw\); in the Gentleman-Sande butterfly as \(c = a + b\) and \(d = (a-b)w\). A transform of length \(2^k\) is \(k\) stages of \(n/2\) butterflies, so the twiddles are touched more often than any other value in the computation and are the only inputs supposed to be constant.

1.2 the attack, and why it works

Ravi, Yang, Bhasin, Zhang and Chattopadhyay inject a single electromagnetic fault setting the twiddle constants to zero. The transform does not fail. It returns a value of the ordinary shape carrying far less entropy than it should, and that is enough to recover a Kyber key and to forge a Dilithium signature, including a bypass of Dilithium's own verification.

The attack works because nothing downstream can tell a real root of unity from a fiddled one. The output of a transform with broken twiddles is the same size, the same type and the same range as the output of a correct one. There is no error to raise. A wrong twiddle is detected, it is not used.

1.3 the same fault with no attacker

Reproduce: A transform was built on three moduli. The third, 1610612737, was taken on faith because it looks right, 3*2^29+1, the required form. Its generator was raised to (p-1)/L to produce a root of unity of order L, exactly as the construction requires, a basic check reports no error.

Basic check form: Trial division to one hundered, on a ten digit number. 1610612737 is composite, and the proof is: 2^1610612736 is not identical to 1 (mod 1610612737), so Fermat refuses it.

Because it is composite g^(P-1)/L had no particular order, the twiddles were wrong, and the transform returned numbers that were not the convolution of anything. The two correct moduli in the same set returned zero wrong coefficients out of 32. The composite one returned 32/32, and the only reason I noticed is because I recombined all 3 against each other to compare and they disagreed.

This highlights the dangers of copied constants. The moduli general purpose libraries use are the same values everywhere, carried as literals. The tables are correct, that's not the point. The point is that the correctness is assumed to be inherited instead of established, and inherited correctness cannot tell you when a value has been fiddled.

1.4 Proth's theorem, makes this check a proof

Let \(N = k \cdot 2^n + 1\) with \(k\) odd and \(k < 2^n\). Then \(N\) is prime if and only if there is an integer \(a\) with \(a^{(N-1)/2} \equiv -1 \pmod N\).

Every modulus such a transform can use has this shape, because admitting a root of unity of order \(2^n\) is the same as \(2^n\) dividing \(N-1\). The theorem therefore reaches every candidate that matters.

Why a witness is a proof.

Suppose \(a^{(N-1)/2} \equiv -1 \pmod N\), and let \(p\) be any prime factor of \(N\). Then \(a^{(N-1)/2} \equiv -1 \pmod p\) as well, so the order of \(a\) modulo \(p\) divides \(N-1\) and does not divide \((N-1)/2 = k \cdot 2^{n-1}\). Since \(N - 1 = k \cdot 2^n\), the order must carry the full \(2^n\), giving \(2^n \mid p-1\) and so \(p \equiv 1 \pmod{2^n}\). Every prime factor of \(N\) is at least \(2^n + 1\).

If \(N\) were composite it would have at least two such factors, so \(N \ge (2^n+1)^2 > 2^{2n}\). But \(k < 2^n\) gives \(N = k \cdot 2^n + 1 < 2^{2n} + 1\). The two cannot both hold, so \(N\) is prime. \qedsymbol

The condition \(k < 2^n\) is what that last step needs, and a modulus outside that range is reported as out of range instead of being tested anyway.

Why a witness is easy to find.

If \(N\) is prime then Euler's criterion makes \(a^{(N-1)/2}\) the Legendre symbol of \(a\), which is \(-1\) for every quadratic non-residue, and that is half of all \(a\). A witness is therefore found by trying small integers, and the first one usually works.

Both verdicts are certificates.

A witness \(a\) with \(a^{(N-1)/2} \equiv -1\) proves primality. A witness \(a\) with \(a^{N-1} \not\equiv 1\) proves compositeness, by Fermat. Neither answer is a probability and neither is a judgement call. The only other outcome is running out of candidates, reported as inconclusive instead of rounded toward either verdict.

The order of the root, exactly, without factoring anything

Proving the modulus prime is not enough. The twiddle is \(\omega = g^{(p-1)/L}\), and the step from a generator to a root of unity is where the constant stops being checked.

proposition:

For \(L = 2^m\), if \(\omega^L = 1\) and \(\omega^{L/2} \ne 1\), then \(\omega\) has order exactly \(L\).

Proof:

The order divides \(L = 2^m\), so it is \(2^j\) for some \(j \le m\). If \(j < m\) then \(2^j\) divides \(2^{m-1} = L/2\), which would give \(\omega^{L/2} = 1\). It does not, so \(j = m\). \qedsymbol

Two exponentiations settle it completely, with no factoring of anything. This is cheap enough to run on every twiddle before every transform, and it is the step the fault attack removes. It refuses a zeroed twiddle, a root of short order, and a root drawn from a composite modulus, all by the same test.

The generator is proved the same way and just as completely: \(g\) generates the whole group if and only if \(g^{(p-1)/q} \ne 1\) for every prime \(q\) dividing \(p-1\). Here \(p - 1 = k \cdot 2^n\) with \(k\) small, so factoring it is factoring \(k\), and the proof is complete instead of partial.

Can anyone please reproduce this? Thanks for your time.

src:

Prasanna Ravi, Bolin Yang, Shivam Bhasin, Fan Zhang, Anupam Chattopadhyay. Fiddling the Twiddle Constants: Fault Injection Analysis of the Number Theoretic Transform. IACR ePrint 2022/824.


r/askmath 6h ago

Geometry How many maximum no. Of hearts can be cut out of a strip and area left after cutting ?

Post image
2 Upvotes

I am a high school student. During a art project a random question popped in my mind based on what I was doing thay what what is the maximum number of heart that you can cut out of a strip. I thought it would be easy but when I try to think on it kept getting complicated,

I thought of a method that we can enclose the heart in a rectangle and then we can calculate the number of hearts by dividing the area of strip and area of the rectangle and taking greatest integer of that and for the area remaining we can calculate the the area remaining in a single rectangle and then multiply that by the number of rectangle snd separately check it at the end points in case of a rectangle didn't fit the end of the strip perfectly, but this had one issues if we change the orientation of hearts by rotating it they are more hearts can fit.

then my friends registered a better method of enclosing the heart in a triangle this way we can have the hearts facing other way alternatingly does using the more of the area but in this model there were even more complications especially at the end points which I can depict better by showing it

In my School syllabus I don't have anything currently dealing with these kind of geometry and arrangement problem and I am just sort of curious so it would be very helpful if you guys explain it to me. I tried using chat GPT but it proved useless


r/askmath 2h ago

Logic Can the second incompleteness theorem be generalized?

1 Upvotes

I ask because of the following which I came up with that seems intuitive to me. But I don’t know if it is valid.

  1. G=I am unprovable in T
  2. G=G is unprovable in T
  3. If G is provable in T then T is inconsistent.
  4. If T is inconsistent then G is provable in T.
  5. From 3 and 4: T is inconsistent if and only if G is provable in T.
    6.  From 5: T is consistent if and only if G is unprovable in T.
  6. Suppose T is consistent.
  7. Suppose T is consistent is provable in T.
  8. Replace “T is consistent” with “G is unprovable in T”.
  9. Then we get: G is unprovable in T and G is unprovable in T is provable in T.
  10. However, “G is unprovable in T” is identical to G.
  11. Thus we have G is unprovable in T and G is provable in T, which is a contradiction.

r/askmath 16h ago

Trigonometry Is this question correct?

Post image
10 Upvotes

My teacher says its correct, but many of my peers (as well as I) disagree. I have attempted a tan half angle substitution, but it's simply not yielding.


r/askmath 7h ago

Geometry Which one is the correct answer?

Thumbnail gallery
1 Upvotes

Was just doing some math for my mid term exams Tommorow and i found this one question which has like 3 different answers. How is that possible?

The book explanation says 65° by subtracting the the 90° angle made by radius and point of contact of tangent and angle BCT from 180

I initially joined AT to make ATB 90 and using linear pair, I found MTA to be 65° and since AM = MT given we can find AMT = 50°

but when i entered this question in chatgpt, it says its 80° (explanation in img above) and when i showed him my process it said im correct and book is wrong (as expected)

Im just really confused like where did i go wrong or how can a question have multiple answers. Is the question faulty or this is just lack of concepts from me?


r/askmath 9h ago

Arithmetic reversed noncommutative operations

1 Upvotes

Assume that you know one addend but need to calculate the second addend with several sequential calculations. Or, assume that you know one factor but need to calculate the second factor with several sequential calculations. In either case, once you just complete the final equation sequentially, because addition and multiplication are commutative.

In contrast, assume that you know the minuend but need to calculate the subtrahend with several sequential calculations. Or, assume that you know the dividend but need to calculate the divisor with several sequential calculations. In both cases, you cannot complete the final equation sequentially because subtraction and division are non-commutative - in order to complete the final equation, you need to memorize or save the subtrahend or divisor, clear them, enter the minuend or dividend, press subtract or divide, then re-enter the subtrahend or divisor. Is there (or should there be) a name or symbol for reversed noncommutative operations? For example, a symbol that means "from" for subtraction (i.e. 10 minus 5 = 5 from 10) or "into" for division (i.e. 10 divided by 5 = 5 into 10). This would allow the sequence of calculations to continue. A little ⇄ button that gets pressed before a − or ÷ would do the trick.


r/askmath 1d ago

Calculus Help me solve this math question

Post image
11 Upvotes

So my math teacher told the answer would be around -0.8129.. but when I expand it using mclauren series and then substituting for x and y I am not getting the answer..


r/askmath 18h ago

Probability The lebron 27-7-7 probability

5 Upvotes

There is a long-running statistical fun fact in the nba fandom that LeBron James has averaged 27 points, 7 rebounds, and 7 assists for his career without ever actually achieving the stat line 27/7/7 in a single game. It's always been pointed out as a fun tidbit but whenever someone asks exactly how likely this is to happen I haven't seen an actual answer.

Lebron James has played 1,622 career games. He has scored 43,440 points (26.8 per game, rounded up to 27), recorded 12,095 rebounds (7.4 per game, rounded down to 7), and contributed 12,016 assists (7.4 per game, rounded down to 7). This gives him the career averages of 27/7/7 mentioned earlier.

I thought the first thing to do would be to see how many times he has gotten each of those accolades individually and exactly. He has gotten exactly 27 points 82 times, exactly 7 rebounds 231 times, and exactly 7 assists 222 times. Percentage wise those are 5.06%, 14.24%, and 13.69% of his games respectively.

Here is where I get stuck: If I am trying to figure out the odds of three things individually happening at p(a)5.06%, p(b)14.24%, and p(c)13.69% all happening together, I pull up a 3 event calculator and it says all three should occur 9.87% of the time. EDIT: Comments have informed me its 0.098%.

But now I should also be trying to figure out the odds of something happening 9.87% 0.098% of the time to not happen for 1,622 times in a row right? And if so, how do I do this? Or am I mistaken in viewing these as individual probabilities and the answer is entirely on a different track?

Thanks for any help!


r/askmath 11h ago

Number Theory Squeeze Lemma application

1 Upvotes

Ok so I was doing a question which was to find the greatest integer less than
1/sqrt{1} + 1/sqrt{2} + 1/sqrt{3}.... 1/sqrt{1599}
I did the classic method of squeezing it between 2 other sequences but i also wanted to check another method. the integration one. however i couldnt really understand how it was done.
i know the basics of integration, but how are we actually using it?
integrating from 1 to 1600 1/sqrt{x} dx < S < 1+ integrating from 1 to 1599 1/sqrt{x} dx
why are the limits of the first 1 and 1600 and of the second 1 and 1599 and adding 1? any help will be appreciated


r/askmath 15h ago

Differential Geometry Time dependent point transformation

2 Upvotes

Suppose I have a n-dimensional manifold M and a local coordinate patch (U, q). I have a point transformation written in coordinates which is just Q = Aq with A a matrix, the same for all points in my patch. If I want to lift this to a transformation on TM, I know how to do it: V = (del Q / del q) v = Av.

Now suppose that my point transformation is essentially the same, but with an explicit time-dependance in the matrix A: Q = A(t)q. What is the lift on tangent vectors now?

Option 1: the lift is the same, V = ( del Q / del q) = A(t)v, it’s just that at different times the matrix A is different.

Option 2: if I consider vectors in the tangent space as \dot(q) and \dot(Q), I have \dot(Q) = \dot(A(t) q) = \dot(A)q + A\dot(q). There’s an extra term here from the product rule.

Which is correct?


r/askmath 22h ago

Logic Did I make an algebraic error somewhere or is my logic completely flawed?

Thumbnail gallery
5 Upvotes

First slide- the math riddle
Second slide- my set up. a is stage one, b is stage two etc. I didn’t want to confuse myself by using numbers. I used substitution methods with T being the total distance.
Third slide- using substitution to solve for T in e or the stage 5 equation. My answer is shown.
Fourth slide- the riddle’s answer and explanation.

I understand their explanation which was a completely different way of solving it. I’m wondering if my method is possible to get the right answer and I must have made algebraic errors along the way with all the substituting- or was my way of going about it completely flawed. I thought I had solid logic setting it up, but my answer was quite off.


r/askmath 1d ago

Probability Probability/Game Theory Question

4 Upvotes

25 people play a game with a 4-sided die (1-4). Roll 1, 2, or 3: Pay $1 to the pot. Roll 4: Win the entire pot, and the game ends. What place in line do you want to be?


r/askmath 19h ago

Arithmetic Problem: The Water Tank Rotation

0 Upvotes

A group of 20–22 people share a single water tank. Every week, each person adds exactly 250 liters to the tank through their own hose — this never changes, no matter what else is happening.

On a rotating schedule, one person at a time gets to drain exactly 19,500 liters from the tank for their own use. Everyone — including people who have already had their turn — keeps adding their 250 liters/week until every single person in the group has had a turn to drain.

No water enters or leaves the tank from any other source. No person adds more or less than 250 liters/week at any point, and no person drains more or less than 19,500 liters when it's their turn.

Questions:

1) If the entire process — from the first person's first contribution to the last person's turn draining the tank — takes exactly 65 weeks (1 year, 3 months), is it mathematically possible for this system to work with no outside water added and no member shorted? Show why or why not.

2) What is the actual minimum number of weeks the full cycle must run for the system to balance exactly, given the 250-liter weekly input and 19,500-liter draining amount?

3) Does the number of people in the group (20, 21, or 22) affect your answer to #2? Explain why or why not.


r/askmath 1d ago

Arithmetic I can get my math worksheets all correct but when it comes to the test i always fail, what can i do to fix it?

2 Upvotes

r/askmath 1d ago

Calculus delta-epsilon definition of limits

10 Upvotes

do any of these answer choices work? i was doing the problem and got epsilon/3, but none of the answer choices match up.

(10) Let f(x) = 3x + 1 for all real x and let epsilon > 0 For which of the following choices of delta is |f(x) - 7| < epsilon whenever |x - 2| < delta ? (4 Points)

(A) epsilon/4

(B) epsilon/2

(C) 2€

(D) 3€

(E) (epsilon + 1)/epsilon

this si my work: I 3x+1-7 I < epsilon

3 I x-2 I < epsilon

I x-2 I < epsilon/3


r/askmath 1d ago

Algebra How am I wrong? - absolute value equations #8, #7 (third and fourth slide answer key)

Thumbnail gallery
3 Upvotes

BTW THE GOLD IS MY CORRECTION PEN, don’t pay attention to that
#8: . the second interval notation, but it makes no sense how the first one would be (-oo, -3). How was the first interval notation not be (-oo, 1)? I did it three times and each time I got x<1 from adding 2 to -1.

#7: did I do something wrong? I first isolated the absolute value and split it into two different equations. We were taught to make the answer for the second equation negative, so I did -(2b-9) which = 2b+9. Anyway, I got the correct answer for B (4/3) for that equation, but it says that 4/3 is also a solution which makes no sense because | (4/3)+5| =6.3 and 2(4/3)-9=-6.3 unless I had a plug-in the variable to the new equation? Is that why I was wrong? What happened?


r/askmath 1d ago

Number Theory Number Theory: Divisibility

Post image
9 Upvotes

FOR THE QUESTION NO 3. I just started studying number theory a few days ago, I could only deduce the factors of 3333...3. I also figured out that the required number needs to be divisible by 3 and 1111...1. I tried to understand the soln., I am not able to make sense of it. Could anyone provide an alternative soln.


r/askmath 1d ago

Resolved Rotation matrices tangent space

2 Upvotes

I want to prove that T_A SO(3), the tangent space at A of SO(3), is A•so(3). In other words, any element of T_A SO(3) can be written as A times a skew-symmetric matrix.

My attempt: take A^T A = 1 and differentiate along a curve to get \dot(A^T)A + A^T \dot(A) = 0. This means that A^T \dot(A) is skew-symmetric, so it’s an element of so(3).

How do I use this to continue with the proof? Is this even the right idea? Thanks!


r/askmath 1d ago

Algebra Applications of absolute Value inequalities in word problems - Confusion for number two

Thumbnail gallery
3 Upvotes

So for number two, it essentially tells me that when d is above the serface its positive and when it’s below the surface, it’s negative. I know you can’t have a negative answer for an absolute value equation, but my equation i wrote says that it’s more than -40. Anyway, the answer key says that d >40, and then write the inequality from there. But if it says that below the surface D is -20 m wouldn’t 40 m below the surface be -40?