Yes, i see now. It's almost like you can break the equation up as

X_{t+1} = aX_hi + aX_lo + c

where X_lo consists of the k' lowest bits and X_hi consists of the rest. Then X_{t+1} mod 2^k' is just aX_lo + c. So it's as if you had a smaller LCG inside the bigger one.

## Search found 512 matches

- Wed Nov 22, 2017 4:16 am UTC
- Forum: Mathematics
- Topic: periodicity in LCGs
- Replies:
**2** - Views:
**1133**

- Tue Nov 21, 2017 5:02 pm UTC
- Forum: Mathematics
- Topic: periodicity in LCGs
- Replies:
**2** - Views:
**1133**

### periodicity in LCGs

An LCG is a random generator in the form: X_{x+1} = (aX_t + c) mod m where X_t was the last number to be output. All variables in this expression are integers. For performance reasons, m is frequently a power of 2, say 2^k. Wikipedia claims that this LCG (with power of 2 m) causes low-order bits to ...

- Sun Oct 22, 2017 9:32 pm UTC
- Forum: School
- Topic: shifting learning out of the classroom
- Replies:
**2** - Views:
**1633**

### shifting learning out of the classroom

Has anyone else experienced a trend of moving the actual learning outside the classroom at different "levels"? I'm not criticizing the teaching, but I noticed that the amount I learn inside the classroom versus outside has decreased. In high school, classes usually consisted of 1. Introduc...

- Fri Sep 29, 2017 1:36 am UTC
- Forum: Coding
- Topic: code for melting computer
- Replies:
**7** - Views:
**3925**

### code for melting computer

What sort of code could I write in a low level language like C in order to induce maximum energy consumption (and hence melt my computer)? I remember being shown graphs in my computer architecture class that showed most of the energy expended during computation was from moving bits around, and that ...

- Wed Aug 23, 2017 1:37 am UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### Re: the central pier of the west span of the bay bridge

https://www.slideshare.net/DavidCollings/multi-span-suspension-bridges there is a journal paper behind this presentation, which is behind a paywall, but nonetheless, this seems to pinpoint exactly the issue behind multi-span suspension bridges, which is the fact that apparently, multiple spans resul...

- Tue Aug 22, 2017 11:38 pm UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### Re: the central pier of the west span of the bay bridge

some more research: first, there seems to be multiple two-span suspension bridges (meaning 3 towers) in china: https://en.wikipedia.org/wiki/Taizhou_Yangtze_River_Bridge https://en.wikipedia.org/wiki/Ma%27anshan_Yangtze_River_Bridge but i was unable to find any three-span bridges, which did not make...

- Tue Aug 22, 2017 10:58 pm UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### Re: the central pier of the west span of the bay bridge

i think we're all in agreement it is reasonable to have a 4 tower double suspension bridge over a 2 tower single suspension bridge the question is, what purpose does the middle pier serve in this 4 tower suspension bridge? we know it serves as an anchorage for the cables, but that reason doesn't mak...

- Tue Aug 22, 2017 8:01 pm UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### Re: the central pier of the west span of the bay bridge

just to make it explicit, i believe that the force on the cables should be the same as long as the distance between two adjacent towers remains constant, no matter how many towers there are. it is for this reason that it's possible to hang electrical cables across many many pylons and the tension do...

- Tue Aug 22, 2017 5:34 pm UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### Re: the central pier of the west span of the bay bridge

yes, i'm away of the reasons they couldn't build a single span, as well as the fact that the central pier happened to rest nicely on shallow water. but as soupspoon pointed out, this doesn't actually explain the presence of the central tower. in the image below, i have drawn out the forces on the ca...

- Tue Aug 22, 2017 5:20 am UTC
- Forum: Science
- Topic: the central pier of the west span of the bay bridge
- Replies:
**30** - Views:
**2540**

### the central pier of the west span of the bay bridge

the west span of the bay bridge in san francisco looks like this https://en.wikipedia.org/wiki/San_Francisco%E2%80%93Oakland_Bay_Bridge#/media/File:San_Francisco_Oakland_Bay_Bridge_Western_Span.jpg as the image shows, it is a double suspension bridge, with a central pier in the middle of the two sus...

- Mon Aug 21, 2017 8:17 pm UTC
- Forum: Science
- Topic: best way to store matter on a large scale
- Replies:
**13** - Views:
**1603**

### Re: best way to store matter on a large scale

i don't know enough about thermodynamics to be sure -- is the energy produced by the temperature difference between the black hole and the CMB equivalent to the amount of energy that would've been produced by fusing all that hydrogen? even with a "quickly" cooling CMB? (quickly relative to...

- Mon Aug 21, 2017 7:59 pm UTC
- Forum: Science
- Topic: best way to store matter on a large scale
- Replies:
**13** - Views:
**1603**

### Re: best way to store matter on a large scale

speising wrote:You can use the hawking radiation.

wouldn't the vast majority of the hawking radiation be emitted at a temperature much lower than the CMB, making it useless for power production?

- Mon Aug 21, 2017 6:27 pm UTC
- Forum: Science
- Topic: best way to store matter on a large scale
- Replies:
**13** - Views:
**1603**

### Re: best way to store matter on a large scale

Well both putting it into a star and putting it into a black hole rather defeats the point of the exercise, which is to store hydrogen for later use.

- Mon Aug 21, 2017 4:56 am UTC
- Forum: Science
- Topic: best way to store matter on a large scale
- Replies:
**13** - Views:
**1603**

### Re: best way to store matter on a large scale

Not so sure about the bigger plan but at least in the short term, it would be a very good idea to stop the wasteful "burning" of hydrogen on a cosmic scale. After that, power production can proceed in a careful, efficient manner, whether that is controlled fusion or dyson sphere

- Sun Aug 20, 2017 1:14 am UTC
- Forum: Science
- Topic: best way to store matter on a large scale
- Replies:
**13** - Views:
**1603**

### best way to store matter on a large scale

as part of a project to delay heat death, suppose we've dissasembled every single star in the observable universe. by the way, i did the math and it would take a star like the sun 10^8 years to output enough energy to pay for it's dissasembly. what is the most energy and material efficient way of st...

- Mon Jul 24, 2017 12:27 am UTC
- Forum: Mathematics
- Topic: Is an orthogonal diagonalization of a real symmetric matrix unique?
- Replies:
**1** - Views:
**1278**

### Is an orthogonal diagonalization of a real symmetric matrix unique?

If we have a real symmetric matrix M which is diagonalized into QLQ^T where Q is orthogonal and L is diagonal (this is possible by spectral theorem), then is Q and L necessarily unique? Is there another orthogonal diagonalization using some Q' != Q or L' != L? I ask this because it seems many explan...

- Sun Jul 16, 2017 3:28 am UTC
- Forum: Computer Science
- Topic: chess under duress
- Replies:
**27** - Views:
**6834**

### Re: chess under duress

Yes, i'm trying to say that i'm not too concerned with the technical details and logistics of the game I wrote up in the op since the goal is to not solve that one particular game but to solve a larger class of games, all of which have the same core "issue" which makes them difficult to so...

- Sat Jul 15, 2017 7:28 pm UTC
- Forum: Computer Science
- Topic: chess under duress
- Replies:
**27** - Views:
**6834**

### Re: chess under duress

i admit that the scenario in the op was a bit contrived, but that was part of my attempt to distill the original problem about a more complex game into a simpler one while retaining the challenging aspects. in case it helps, here's the original game: https://en.wikipedia.org/wiki/Hanabi_(card_game) ...

- Mon Jul 10, 2017 9:16 am UTC
- Forum: Mathematics
- Topic: distribution of a quadratic function of a multivariate normal
- Replies:
**2** - Views:
**1820**

### Re: distribution of a quadratic function of a multivariate normal

So I took the easy way out and went googling. I was actually pretty skeptical there would be a solution to this, mainly because I have seen derivations for the expectation and covariance of the expression many times, but I have never seen an attempt to figure out what the distribution actually is. S...

- Sun Jul 09, 2017 8:40 pm UTC
- Forum: Computer Science
- Topic: chess under duress
- Replies:
**27** - Views:
**6834**

### Re: chess under duress

english has less than 1.5 bits of entropy per character, so with 30 moves you could send something like 20 characters, although it's possible that an address or something may have more entropy than your average sentence. but i'm not interested in a specific scheme for a scenario where you want to se...

- Sun Jul 09, 2017 2:46 am UTC
- Forum: Computer Science
- Topic: chess under duress
- Replies:
**27** - Views:
**6834**

### chess under duress

suppose you've been kidnapped and your captors want to play televised game of chess. if you lose, they'll double the ransom, so you don't want to lose. however, since you are a very forward-thinking individual, you have prepared for this scenario, and have set up a system for communicating to your f...

- Sat Jul 01, 2017 7:10 pm UTC
- Forum: Mathematics
- Topic: distribution of a quadratic function of a multivariate normal
- Replies:
**2** - Views:
**1820**

### distribution of a quadratic function of a multivariate normal

if x is drawn from a multivariate normal with mean mu and covariance sigma, what's the distribution of z = x.T P x (.T denotes transpose and P is an arbitrary square matrix) i suspect that f(z) = ∫ p(x) dx where the integral is over all x such that x.T P x = z but i'm not sure how to carry out this ...

- Tue May 30, 2017 4:37 am UTC
- Forum: Mathematics
- Topic: properties of a certain game
- Replies:
**2** - Views:
**1896**

### Re: properties of a certain game

thanks for the observations. i actually played a few test games against a friend yesterday and did notice the things you mention (though that may just be confirmation bias). hastily written code attached. in a spoiler tag, because the forum wouldn't let me attach any files for some reason #!/usr...

- Fri May 26, 2017 2:52 pm UTC
- Forum: Science
- Topic: Superconducting CPU?
- Replies:
**66** - Views:
**8546**

### Re: Superconducting CPU?

i don't see any reason why, here's the wikipedia page on it

https://en.wikipedia.org/wiki/Superconducting_computing

https://en.wikipedia.org/wiki/Superconducting_computing

- Fri May 26, 2017 2:39 am UTC
- Forum: Coding
- Topic: Neighbors of a cluster: What is this called?
- Replies:
**8** - Views:
**3009**

### Re: Neighbors of a cluster: What is this called?

one way to get it down to about O(nk) where n is the number of points and k is the number of close-to-B points is by doing a dijkstra like algorithm. first treat the points as a graph with n vertices and n^2 edges. then run dijkstra, but start with the set B instead of the singleton set containing t...

- Thu May 25, 2017 2:42 pm UTC
- Forum: Mathematics
- Topic: Interesting question regarding Fermat nested radicals
- Replies:
**9** - Views:
**2603**

### Re: Interesting question regarding Fermat nested radicals

here's the corresponding OEIS page and it provides a an alternate equivalent formula which looks much easier to work with and also a efficient algorithm

https://oeis.org/A273580

and a lookup in https://isc.carma.newcastle.edu.au/advancedCalc gives no results ;(

https://oeis.org/A273580

and a lookup in https://isc.carma.newcastle.edu.au/advancedCalc gives no results ;(

- Thu May 25, 2017 6:38 am UTC
- Forum: Mathematics
- Topic: properties of a certain game
- Replies:
**2** - Views:
**1896**

### properties of a certain game

this is a two player, zero-sum game. the state is 2 vectors and two scalars (one vector and scalar per player). call the vectors x and y and the scalars p and q respectively. x and y have some fixed dimension k. (and if it makes things easier, feel free to let k be infinite) player 1 wins if p > 0 a...

- Sat May 20, 2017 3:16 pm UTC
- Forum: Mathematics
- Topic: Any machine learning folks on this forum?
- Replies:
**3** - Views:
**2168**

### Re: Any machine learning folks on this forum?

linear regression models are pretty fundamental and widely used -- in fact, my school has an entire semester long course on various forms of linear regression. and i would bet that in terms of "number of times applied", this would be the winner two other good ones are decision trees + thei...

- Mon May 01, 2017 6:41 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

(y, y) is a pair, which is encoded as string x, so x = <(y,y)> which i've written with a bit of notation abuse as x = <y,y>

- Mon May 01, 2017 5:30 pm UTC
- Forum: Coding
- Topic: Basic Question Involving Functions (Python)
- Replies:
**18** - Views:
**5503**

### Re: Basic Question Involving Functions (Python)

if the function name is fn, you can run the command help(fn) to print out instructions and information on what inputs it takes. google is also another resource

- Mon May 01, 2017 5:21 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

try to think of them as physical machines instead of programs. a machine takes in a string as an input, and spits out yes, no, or loops forever now if you try to put one machine D inside another machine M, that's not possible, because machines can only take string as input. so what we do instead is ...

- Mon May 01, 2017 5:16 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

yes, we write D to represent the program (program-use), and <D> to refer to the "string-use" (aka encoded) version of D

- Mon May 01, 2017 5:06 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

yes, that makes sense. it will help to understand the idea of encoding something often, we want programs to take other mathematical objects as input, such as pairs of numbers, lists of pairs of numbres, or even other computer programs however, formally, computer programs can only take strings as inp...

- Mon May 01, 2017 4:59 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

no, i don't think so. but there are not that many programs and arguments. we have M, the halting problem solving program, which takes the bare minimum it needs! it only takes the program and the input you want to test. then we have D, the program which we are designing to mess up M. D only takes a s...

- Mon May 01, 2017 4:54 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

it's not super important, but under the turing model of computation, turing machines (aka computer programs) take exactly one string as an input. of course, if you want to feed a machine two inputs, you can just combine the two inputs and put a delimiter between them. for example, you might feed two...

- Mon May 01, 2017 4:49 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

what i gave is a proof-by-contradiction type proof. just try to follow all the inputs and explain where you get stuck -- there are only two machines, each of which takes one input (well M takes one pair...)

- Mon May 01, 2017 4:46 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

What I'd like to make sense of now is the program-within-a-program paradox Here's a pretty standard proof I think. I'll use <> angle brackets to denode encoding. First we suppose that we have some program M, such that M(x) tells us if the program and input pair encoded by x will halt. In other word...

- Mon May 01, 2017 4:32 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

well suppose you wrote a program to multiply two numbers. it doesn't make much sense to talk about whether the program halts, because it won't really do anything unless you give it some input (the numbers to be multiplied). even the empty string is a valid input, of course formally, the halting prob...

- Mon May 01, 2017 4:27 pm UTC
- Forum: Mathematics
- Topic: Halting Problem
- Replies:
**208** - Views:
**20238**

### Re: Halting Problem

That is a great explanation, thank you. What I'm stuck on is the standard explanation in which one assumes that there's a program that can tell you whether any particular program fed into it will halt (or not halt). That's where I get hung up. the proof usually follows this logic: suppose it is pos...

- Mon May 01, 2017 2:56 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies:
**9848** - Views:
**1680320**

### Re: Coding: Fleeting Thoughts

just to eek that last bit of performance out of python, i manually inlined all my helper functions into one single monstrous blob of code. just about doubled the speed too, which is way more than i expected, but it still wasn't good enough, so i had to rewrite it in c++