tag:blogger.com,1999:blog-67578052017-05-25T16:03:26.767ZKen's blogmostly on computers and mathematicsKennoreply@blogger.comBlogger6751125tag:blogger.com,1999:blog-6757805.post-19817144548313271572017-05-24T07:39:00.001Z2017-05-24T22:37:06.210Z[bjacwkze] 4 cubes<p dir="ltr">A cube with distinct faces can be rotated to 24 different orientations. Curiously, there are also 24 permutations of 4 objects, so 4 cubes can be in 24^5 different states, about 8 million.</p> <p dir="ltr">Vaguely similar is the isomorphism between 60 orientations of an icosahedron and the alternating group A[5].</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-69326608029090408292017-05-24T06:56:00.000Z2017-05-24T22:33:13.319Z[sicjuipl] On the beauty of things<p dir="ltr">Some people remain interested in mathematics, perhaps pursing it as a career, because they feel it is beautiful. How is the appreciation of this beauty learned, or if it is innate, how is it unlearned in other people? Obviously this applies to many other fields also. Understanding this phenomenon is the key to STEM education, but I feel we are charging forward trying to increase STEM education without understanding it, so efforts may be wasted or in vain.</p> <p dir="ltr">For a job application, can a prospective employer measure whether an applicant considers their field beautiful? This may strongly influence employee productivity.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-74008541998618248252017-05-16T17:42:00.001Z2017-05-23T17:50:55.470Z[nbdfbdlo] Not simulation<p dir="ltr">I don't think we live in a simulation, because accurate simulation of our universe is extremely difficult. The story goes, the full quantum treatment with the Schroedinger equation of a single isolated hydrogen atom (1 electron) is relatively easy, but trying to model a helium atom, with 2 electrons, is already so difficult that numerical simulations on our most powerful computers struggle with it. (This story might be out of date). The universe, as even one person experiences it, is much more complicated than a single helium atom, and a full quantum treatment is necessary, because a person experiences many quantum effects, e.g., chemical reactions, not falling through the floor.</p> <p dir="ltr">I suspect that those who speculate that we live in a simulation have never tried computational chemistry or other scientific computer simulations of the real world. Perhaps they see video games or movies, but likely do not know of the huge amounts of simplifying assumptions made in those products when something only needs to look good enough for entertainment, not be scientifically accurate.</p> <p dir="ltr">In order to argue we are not in a simulation, we must postulate limits on the computational capabilities of those who might be simulating us. I suspect simulating our universe is at least NP-complete, probably at least PSPACE-complete. Research into complexity theory, in our universe, can settle these questions. We postulate that even in the simulators' universe, it is impossible to build computers to solve those problems in a reasonable amount of time. Equivalently, but sounding more radical, any universe in which you can build such computers will not be able to sustain life. (Then again, life, uh, finds a way, even in seemingly difficult environments.)</p> <p dir="ltr">Simulating our universe is so difficult that it might be easier just to build it for real (in which case, we are again not a simulation). This echoes one of the biggest potential uses for quantum computers being to do quantum simulations, or, not simulating a microchip in software, but emulating it with an FPGA.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-60863015185154977262017-05-16T17:15:00.002Z2017-05-17T14:59:33.897Z[obcsqmdo] Double U<p dir="ltr">If it is necessary to sacrifice one letter of the alphabet (perhaps to fit the remainder into a 5x5 square), W seems like a good choice, being easy to substitute two U or two V. Those digraphs occur extremely rarely in English, so there is little worry for ambiguity or collision. Sawy vacwm.</p> <p dir="ltr">Merging I and J, commonly done, recalling Latin, is also not too bad.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-88575340937075242342017-05-16T17:15:00.001Z2017-05-17T14:58:51.262Z[vinlqxgw] Self winding digital watches<p dir="ltr">Create a digital wristwatch that harnesses enough power from the wearer's movement so that it does not require changing a battery, similar to self-winding mechanical watches. It will still probably require changing its rechargeable battery due to hysteresis. Maybe other parts will break first.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-76994250548817649382017-05-10T12:57:00.001Z2017-05-16T14:16:12.525Z[ctimitkr] Sea level origin<p dir="ltr">Plot elevations of every point on earth in spherical coordinates. The 2 angular coordinates remain the same, but make the radial coordinate the distance above or below sea level, not distance from the center of the earth. This will cause areas below sea level, especially ocean floors, to poke through the origin and out the other side. Maybe only do one hemisphere at a time, or omit below-sea-level points. Let sea level be adjustable.</p> <p dir="ltr">Inspired by spherical harmonics and electron orbitals, in which negative radii come out the other side. <a href="/2014/05/wfxahadw-circular-harmonics.html">(Previously.)</a></p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-39641853611152782422017-05-10T12:38:00.001Z2017-05-16T14:10:46.717Z[sysxmawj] Mars topographic globe<p dir="ltr">Create a topographic globe of Mars with elevations magnified. The goal is to highlight the difference between its hemispheres. Does the Borealis Basin cause Mars to deviate significantly from a sphere or ellipsoid?</p> <p dir="ltr">VR or 3D print.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-1365990267515484842017-05-10T12:30:00.001Z2017-05-16T14:09:16.070Z[hoaettpp] The wanderers<p dir="ltr">Create a planetarium show in which the stars stay fixed and the planets and Sun move at accelerated speed through the fixed field of the stars. This approximates taking a snapshot of the sky every sidereal day. This has probably already been done. Various options: planetary discs made bigger than reality (perhaps also scaled with distance), with tails to better see the path, the fixed background need not be the stars, it could be anything. Perhaps recreate in virtual reality, because planetaria are expensive. With VR, we could also magnify parallax and also depict the planets moving closer and farther away from the earth.</p> <p dir="ltr">Consider using a modern ephemeris (e.g., JPL DE, VSOP87) to accurately model the locations of the planets. Can the eye notice the effects of Jupiter?</p> <p dir="ltr">If we make the approximation that all the planets lie on the same plane (ecliptic), then the location of a planet in the sky can be specified with just one number. Plot that number versus time.</p> <p dir="ltr">Incorporating distance essentially simulates a geocentric model of the solar system, since the observer (on simulated earth) seems not to move.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-618335805599758132017-05-10T10:26:00.001Z2017-05-16T14:19:54.221Z[klebiokz] Proving ellipticity<p dir="ltr">Replicate the experiments that proved that each planet moves in an elliptical orbit (as theorized by Kepler) not circular (as theorized by Copernicus). Quite amazing is that Kepler proved his result using only naked-eye observations by Tycho Brahe and colleagues.</p> <p dir="ltr">Replicate the experiments that proved that the shape of the earth is an ellipsoid, not a sphere.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-88006361850983132752017-05-09T14:35:00.001Z2017-05-16T14:06:58.079Z[eaxgdlpg] Helium density by phase<p dir="ltr">Helium as a gas has density 0.164 kg/m^3 at room temperature and 1 atmosphere. As a boiling liquid, its density is 125 kg/m^3 (which incidentally is much less than water, 1000 kg/m^3).</p> <p dir="ltr">1 cup of liquid helium therefore has a mass of 0.0296 kg. The same mass as a gas would have volume 0.180 m^3. Approximate a party balloon as a 10.5 inch diamater sphere, so it has volume 0.01 cubic meter. Then, 1 cup of liquid helium is enough gas to fill 18 balloons. This assumes the pressure inside a balloon is atmospheric pressure, which is false (but might still be close enough) because the tension of the latex squeezing the gas inside would increase its pressure.</p> <p dir="ltr">Inspiration was, how much do we have to worry about wasting highly non-renewable helium on party balloons? I'm guessing typical cryogenic applications, e.g., MRI, use gallons of liquid helium.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-86848656799636102262017-05-08T22:04:00.000Z2017-05-16T14:15:45.703Z[kdsvzhsd] Combination door lock<p dir="ltr">Something I'm surprised is not more prevalent (I don't know if it even exists) is a door lock that is a combination lock on the outside and a thumb turn on the inside.</p><p dir="ltr">Of course, combination locks generally offer less security than keyed (a tradeoff with convenience), but many people already don't care to have high security door locks (they probably have other mechanisms in place to deter or decrease breaking and entering).</p><p dir="ltr">Can such a lock be made with reliability on par with keyed locks? If electronic, then power, including battery failure, is an issue. Previously, <a href="/2017/05/imbnyxus-human-powered-electronic-lock.html">exploring human power</a>.</p><p dir="ltr">If electronic, then it could be easy to reset, assign, and revoke different combinations to different people. Can such features be built purely mechanically?</p><p dir="ltr">It could be simulated with a combination lock box holding a key to a traditional keyed door lock key. <a href="/2017/04/zjutseyk-padlock-logic.html">Multiple combinations could be accomplished with an OR gate.</a></p>Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-58706532449127928932017-05-08T12:22:00.001Z2017-05-25T15:51:51.786Z[wlilyvep] Computing division in cyclotomic fields<p dir="ltr">Let L be a primitive root of unity, L^n=1. Let ca=a0*L^0+a1*L^1+...+a(n-1)*L^(n-1) be an element in the cyclotomic field generated by L. (The coefficients a0...a(n-1) are typically rational numbers in the context of the mathematical objects called Number Fields, from whence "Number Field Sieve".) Similarly another element cb with coefficients b0...b(n-1). We wish to divide them, to compute cb/ca.</p> <p dir="ltr">That is, we wish to find cx such that ca*cx = cb. Let cx have coefficients x0...x(n-1). Expand ca*cx by the distributive law and collect by like powers of L. For powers of L that are greater than or equal to n, reduce the power according to the rule L^n=1, that is, compute the exponent mod n. Collect by like reduced powers.</p> <p dir="ltr">Match up the like powers of (collected) ca*cx with like powers of cb and set them equal to each other. This results in a system of n linear equations in the n unknown coefficients of cx. Write the system of linear equations in matrix form Ax=b then solve for x as usual. You probably want some matrix library that can work with exact rational numbers in order for the output coefficients of cx to be rational numbers.</p> <p dir="ltr">The matrix A is highly structured, containing lots of cyclic permutations of the coefficients a0...a(n-1). It might be possible to exploit this structure to compute things faster, but I don't know how.</p> <p dir="ltr">Recall we are computing cb/ca. If we have a constant ca but lots of different cb, then we can precompute the reciprocal of ca once (that is, divide 1/ca by the above method), then all the divisions become multiplications by the reciprocal. However, conversely, if we have constant cb but lots of different ca, is there a way to precompute something to make it go faster? Although the matrix A will differ each time, the pattern of the permuted coefficients remains the same, so it suggests it might be possible to precompute something.</p> <p dir="ltr">This method can be generalized beyond cyclotomic fields. The exponents were reduced by the rule L^n=1, so L is the generator of a cyclic group. We can generalize to a different group structure using different reduction rules for a different group's generators. (Groups that are not cyclic groups must have more than 1 generator.) Note that many finite groups are very large, so we would therefore need to do very large NxN linear algebra where N is the order of the group. We also have to be careful with collecting like powers if the group does not commute.</p> <p dir="ltr">Pari/GP has some nice built-in functionality for computing division and reciprocal in cyclotomic fields. We compute an example in the 7th cyclotomic field, with the 7th root of unity, the root of L^7-1=0. Let's compute a reciprocal of (3,1,4,1,5,9,2):</p> <p dir="ltr">? 1/Mod(3 + 1*L + 4*L^2 + 1*L^3 + 5*L^4 + 9*L^5 + 2*L^6,L^7-1)<br> Mod(-145932/4200025*L^6 + 97168/4200025*L^5 - 189607/4200025*L^4 + 106793/4200025*L^3 + 430943/4200025*L^2 - 128532/4200025*L - 2832/4200025, L^7 - 1)</p> <p dir="ltr">Aside: Pari/GP can seemingly handle modulus being an arbitrary polynomial, not just L^n-1, so there is something slightly fancier going on. Probably put the highest order term on one side: a(n)*L^n = -a(n-1)*L^(n-1) - a(n-2)*L^(n-2) - ... - a0*L^0, then define a reduction rule L^n = ... by dividing through by a(n). Actually, just use polynomial division and remainder to reduce.</p> <p dir="ltr">We can compute the reciprocal of (3,1,4,1,5,9,2) using the linear algebra process described above. The coefficients come out in the reverse order as above.</p> <p dir="ltr">? A=[3, 2, 9, 5, 1, 4, 1; 1, 3, 2, 9, 5, 1, 4; 4, 1, 3, 2, 9, 5, 1; 1, 4, 1, 3, 2, 9, 5; 5, 1, 4, 1, 3, 2, 9; 9, 5, 1, 4, 1, 3, 2; 2, 9, 5, 1, 4, 1, 3];<br> ? (1/A)*[1;0;0;0;0;0;0]</p> <p dir="ltr">[-2832/4200025]</p> <p dir="ltr">[-128532/4200025]</p> <p dir="ltr">[430943/4200025]</p> <p dir="ltr">[106793/4200025]</p> <p dir="ltr">[-189607/4200025]</p> <p dir="ltr">[97168/4200025]</p> <p dir="ltr">[-145932/4200025]</p> <p dir="ltr">As with <a href="/2017/04/ocilzptj-arithmetic-in-any-quadratic.html">quadratic fields</a>, we could also ask that if a programming library provides arithmetic on complex numbers, it could more generally provide arithmetic on arbitrary polynomial field extensions of the reals (complex numbers extend with L^2+1). Linear algebra, solving Ax=b, is considerably hairier than complex number arithmetic, though.</p> <p dir="ltr">Because a field extension creates a field from another field, the process can be iterated. We can invent incredibly complicated objects which obey field axioms.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-13490040024912902272017-05-06T12:06:00.001Z2017-05-08T19:47:44.665Z[rhcuggst] Fast 64-bit factors<p dir="ltr">For the current ranges of the Cunningham project (August 2016), the largest number is 3^850 = 1348 bits. For numbers of that magnitude, ECM can quickly find factors of 64 bits or less: between 5 seconds to 2 minutes depending on <a href="/2017/05/xuzamfou-parallel-ecm.html">software</a>, hardware, and luck.</p> <p dir="ltr">This serves as a nice threshold for factors which do not need to be carefully <a href="/2017/04/bvahtsov-cunningham-sculpture.html">preserved</a> because they can quickly be recalculated.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-38394885064486673862017-05-06T12:05:00.003Z2017-05-08T19:43:49.910Z[euzimeht] a^n \pm b^n<p dir="ltr">Consider numbers of the form the sum or difference of two powers (same exponent): a^n + b^n or a^n - b^n. Integers of that form, or integer sequences indexed by n, seem interesting. They could use a name.</p> <p dir="ltr">Famously, Fermat's Last Theorem.</p> <p dir="ltr">The Cunningham Project investigates b==1. The above expression has algebraic factorizations. Inspired by "The search for Aurifeuillian-like factorizations" and the reference to Schinzel. We could imagine a much larger project investigating b not equal to 1.</p> <p dir="ltr">Fibonacci numbers are almost this form, where a and b are not integers. We need to divide through by sqrt(5). Fibonacci also have neat algebraic properties. We could define sequences r*(a^n - b^n) permitting real (maybe even complex) r a b, such that the value is integer for all non-negative integer n.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-50085486425974413892017-05-06T12:05:00.001Z2017-05-08T19:42:32.812Z[bollcmpa] Blackjack as a speed arithmetic incentive<p dir="ltr">Play a game which has positive expected outcome for the player, so provides incentive to play it as rapidly and often as possible. The game's mechanic could involve mental arithmetic, thereby providing incentive to learn to do mental arithmetic rapidly, so it is an educational game.</p> <p dir="ltr">Blackjack is one possibility, except playing from the point of view of the house (the dealer). The human dealer (representing the house) plays against one or more computer player/bettors and the card outcome of each game is shown. The dealer has to sum the cards of each bettor's hand and decide whether to pay out. Mistakes by the human that overpay a bettor do nothing special other than eat into the house's profits (which the human wants to maximize). Mistakes which underpay a bettor are caught, the house must pay out, and maybe some other penalty like a time penalty which also eats into the house's profits because the house makes more money the more rounds are played. (Even if blackjack played optimally is an exception to "the house always wins", we can still cause the house to win by having the computer bettors play less than optimally.)</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-10397144615102212672017-05-06T12:04:00.005Z2017-05-08T19:41:19.883Z[mtilcwmv] Friends who won't help you move a body<p dir="ltr">Friends help you move; real friends help you move a body.</p> <p dir="ltr">While a social network of real friends would be potentially useful, it would probably run into legal and practical issues: How can you tell if someone is lying? Many people don't even know themselves if they would help a friend move a body if it came to it.</p> <p dir="ltr">Next best might be layering on an existing social network declarations that you <em>won't</em> help which friend move a body. It isn't illegal to say that. A friend then in need can then filter out those and evaluate the rest, some who might be real friends and some who might be too lazy to have answered the poll.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-19203583916252560662017-05-06T12:04:00.003Z2017-05-08T19:36:15.635Z[ekzonzbp] Late Heavy Bombardment and Base Delta Zero<p dir="ltr">The description of LHB reads like science fiction: the earth was hit by so many asteroids that it <a href="/2009/04/boil-away-oceans-so-they-dont-come-back.html">reliquified the earth's crust</a>.</p> <p dir="ltr">Astroengineer such an event again. Maybe moving Mars to plow through the asteroid belt would be enough, or maybe we have to move Jupiter again.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-53101277840816068262017-05-06T12:04:00.001Z2017-05-09T13:35:06.068Z[zlvvamaa] Distributed vs Virtual memory<p dir="ltr">Compare the speed of virtual memory on a local hard disk versus going over the network to access a remote computer's RAM. Both are likely pretty bad, but which is worse?</p> <p dir="ltr">The latter could be accomplished by NFS sharing a ramdisk, which is then used on the other computer to hold a swap file. Possibly useful for a <a href="/2017/05/mlwmffmf-beowulf-cluster.html">small cluster</a>. We would like some way of keeping the operating system on local memory, and only allow an application to use the network remote memory, so that a network or NFS fault will only crash the application and not the whole OS.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-15419049531963415102017-05-06T12:03:00.001Z2017-05-08T19:26:37.184Z[jsqaswqe] Base 94<p dir="ltr">Base 94 seems attractive for compactly encoding data: the printing ASCII characters minus space. Space can then function as an escape character for signifying metadata.</p> <p dir="ltr"><a href="/2016/11/wisnmyni-data-as-number.html">Byte strings (base 256 with possible leading zeroes) can be unambiguously be converted to base 94.</a></p> <p dir="ltr">Curiously <a href="/2016/04/rvkxkkwz-iroha-table.html">iroha is base 47</a>, half of 94. </p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-56591638392496862752017-05-06T12:02:00.003Z2017-05-08T19:21:55.653Z[imbnyxus] Human-powered electronic lock<p dir="ltr">Create an electronic lock (perhaps door lock) which does not require batteries or be connected to electrical mains. Instead, power is supplied each time by the person operating it: pull a lever or turn a crank to generate electricity. Even better, step up onto a platform which descends due to your weight, generating electricity. 6 inch * 100 lb = 68 joules = 6.8 seconds * 10 watt which seems plenty for operating a lock.</p> <p dir="ltr">Ideally we would like reliability and ease of repairs / cost of ownership comparable or better than a fully mechanical lock.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-91261028882891325972017-05-05T19:10:00.003Z2017-05-08T19:19:24.849Z[vssboyhp] Model organisms evolving<p dir="ltr">How much have model organisms evolved over the years to survive -- thrive -- for lab conditions, or, more likely, for the conditions during idle or storage in between experiments?</p> <p>Does this affect experimental results? Probably yes in comparing results with older results on the "same" model organism.</p>Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-68475293296986139562017-05-05T19:10:00.001Z2017-05-06T21:35:35.386Z[hcqjiotw] Computer improving music<p dir="ltr">Train machine learning to distinguish between <a href="/2014/08/wcbphsse-popular-classical-music.html">good</a> and bad music.</p> <p dir="ltr">Then (somehow) use it to improve a given piece of music. This is different from the typical Holy Grail of a computer composing good music from scratch.</p> <p dir="ltr">It is also similar to how humans are creative, always building on something else.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-77412788393754422752017-05-05T19:09:00.001Z2017-05-06T21:11:15.332Z[xuzamfou] Parallel ECM<p dir="ltr">Here is a bash script to spawn several parallel instances of GMP ECM to find one factor.</p> <p dir="ltr">command rm out.* ; nproc=4 ; for i in $(seq 1 $nproc) ; do echo The_number_to_factor | nice -19 time -o out.time.$i ecm -c 0 -I $nproc -one 10000 > out.log.$i & done ; wait -n ; killall ecm</p> <p dir="ltr">Notes:</p> <p dir="ltr">Use the physical number of processors, not hyperthreaded ones. Probably bottlenecked by ALU, not memory access. But hyperthreading might be useful when large B2.</p> <p dir="ltr">wait -n is a nice primitive: whoever finishes first wins.</p> <p>Consider --disable-aprcl during the configure step to speed up final verification of prime factors. It is unfortunate that this cannot be disabled at run time.</p>Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-25632045237384523422017-05-02T01:28:00.001Z2017-05-06T18:59:59.200Z[shjnmftv] Dual crossword<p dir="ltr">Create a crossword puzzle with two solutions: large portions of the puzzle have two possible letters, both valid answers to the clues.</p> <p dir="ltr">Each solution could have a theme which ties it together.</p> Kennoreply@blogger.com0tag:blogger.com,1999:blog-6757805.post-62769598187834339782017-05-02T01:20:00.001Z2017-05-06T18:59:26.158Z[udvieqsl] Smooth closed curve fitting<p dir="ltr">Given a set of points, fit a smooth closed curve through them. Fairly easy and commonly done are splines, but splines are not infinitely differentiable.</p> <p dir="ltr">Perhaps restrict it to a sum of circular harmonics around a given circle center point.</p> Kennoreply@blogger.com0