Skip to content

Made some major changes to All possible scalar products subsection #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 17, 2018

Conversation

roll-no-1
Copy link
Contributor

Here are the details and possible reasons for the change:

  • Changed (k-n-1) th shift to (k-(n-1))th shift. The former evaluates to -1th shift for k = n and is wrong.
  • Changed cyclic shift to cyclic left shift. I always got confused while reading this since I tend to forget whether it was the left shift or the right shift of b. So, I decided to add it explicitly since others may also face the same problem in the future without this info.
  • Changed index nos. of k from [n .. 2n-1] to [n-1 .. 2n-2]. Since c[n] == c[2n-1], it might make more sense to start from n-1 since after doing this we get shifts in the increasing order i.e., 0th shift, 1st shift, ... , (n-1)th shift.
  • Added a note in case anyone wonders about the value at c[2n-1].

Changed is_prime[j] = true to is_prime[j] = false
Changed max(start_idx, 2) * p to max(start_idx, p) * p. This is done so that we always start from the max. of the smallest multiple of p in the range [l, r] and p * p. It is more beneficial to start from p * p rather than 2 * p as lower multiples of p would have been covered by the smaller prime factors.
The text read: "Here we have an implementation that counts the number of primes smaller to n using block sieving" while actually the code counts the number of primes smaller than or equal to n.
Updating my copy of emaxx-eng
Changed "arrays of with values values" to "arrays of values" in line 1 of this sub topic
Updating my own fork of emaxx-eng
Here are the details and possible reasons for the change:
* Changed (k-n-1) th shift to (k-(n-1))th shift. The former evaluates to -1th shift for k = n and is wrong.
* Changed cyclic shift to cyclic left shift. I always got confused while reading this since I tend to forget whether it was the left shift or the right shift of b. So, I decided to add it explicitly since others may also face the same problem in the future without this info.
* Changed index nos. of k from [n .. 2n-1] to [n-1 .. 2n-2]. Since c[n] == c[2n-1], it might make more sense to start from n-1 since after doing this we get shifts in the increasing order i.e., 0th shift, 1st shift, ... , (n-1)th shift.
* Added a note in case anyone wonders about the value at c[2n-1].
@roll-no-1
Copy link
Contributor Author

Please note that I have no prior experience with latex. I added a few $ symbols for mathematical expressions or stuff. Maybe I didn't get them right. You can suggest any changes in that case.

@jakobkogler jakobkogler merged commit 584244b into cp-algorithms:master Oct 17, 2018
@jakobkogler
Copy link
Member

Thanks. Looks correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy