Anonymous

User talk:Daveb: Difference between revisions

From London Hackspace Wiki
m
Line 44: Line 44:
I just open the caliper case, cut the battery trace (which one doesn’t matter), drill two holes to allow the fine (wire wrap) wire to come out the top to a micro-miniature slide switch glued to the top. I always turn the switch off, rather than press some caliper “off” button, and find that a button cell lasts for many years. I would attach a picture if Sparkfun allowed, but it doesn’t. Caliper thickness is unchanged, and the outline is very nearly unchanged.
I just open the caliper case, cut the battery trace (which one doesn’t matter), drill two holes to allow the fine (wire wrap) wire to come out the top to a micro-miniature slide switch glued to the top. I always turn the switch off, rather than press some caliper “off” button, and find that a button cell lasts for many years. I would attach a picture if Sparkfun allowed, but it doesn’t. Caliper thickness is unchanged, and the outline is very nearly unchanged.
|-
|-
|'''prime number generator'''|| thought || Invert the sieve of Aristophanes, so the data structure holds primes and the next multiple of each prime. Keep the data-structure sorted by the next multiple. When a gap occurs between the current nearest multiple and the next nearest the gap contains prime number(s).
|'''prime number generator'''|| silly thought || Invert the sieve of Aristophanes, so the data structure holds primes and the next multiple of each prime. Keep the data-structure sorted by the next multiple. When a gap occurs between the current nearest multiple and the next nearest the gap contains prime number(s).
The algorithm requires sorting subsequent multiples into place.
The algorithm requires sorting subsequent multiples into place.
If N is the number of discovered primes N, and the size of the primes is S:
If N is the number of discovered primes N, and the size of the primes is S:
Line 50: Line 50:
cpu use is O(S*N*N)
cpu use is O(S*N*N)


Other ideas:  
Other thoughts:  
* use wheel factorisation of the first M primes to compactly and efficiently represent the impact of these first M primes, where M is chosen so the product of these primes fit in a machine word, and so that the primes less than the product fit in affordable memory.
* use wheel factorisation of the first M primes to compactly and efficiently represent the impact of these first M primes, where M is chosen so the product of these primes fit in a machine word, and so that the primes less than the product fit in affordable memory.
* use interval arithmetic to keep track of the intermediate numbers.
* use interval arithmetic to keep track of the intermediate numbers.
* can it be fitted to hardware?
* can it be fitted to hardware?
|-
|'''factorisation'''|| silly thought || By trial division using list of known primes; is exceedingly slow for large numbers; the number of potential factors is O(sqrt(N)) - if N is more than 100 bits that is a big number.  However, can knowledge of the factors be used to restrict the search space usefully? What are the constraints on the factors imposed by PGP for example
|-
|-
|}
|}
153

edits