## Search found 527 matches

- Wed Oct 24, 2018 5:09 pm UTC
- Forum: Coding
- Topic: avoiding coding "representation errors"
- Replies:
**20** - Views:
**10699**

### Re: avoiding coding "representation errors"

yes, automatically converting representations is definitely a bad idea, especially since the conversion process is often not "lossless" as you gave an example of. (also it's usually impossible to do automatically, as you can't convert a camera frame coordinate to a world frame coordinate w...

- Sun Oct 21, 2018 10:23 pm UTC
- Forum: Coding
- Topic: avoiding coding "representation errors"
- Replies:
**20** - Views:
**10699**

### avoiding coding "representation errors"

a class of programming bugs i often commit involve mistaking the "representation" of a variable -- such as adding degrees and radians, treating a coordinate in the camera-frame as a coordinate in the world-frame, or forgetting to swap the channels of an image from BGR to RGB. this can be a...

- Sun Apr 29, 2018 7:12 pm UTC
- Forum: The Help Desk
- Topic: Compressing video and photo or I lose my job
- Replies:
**7** - Views:
**3518**

### Re: Compressing video and photo or I lose my job

ffmpeg is a nice piece of software for reencoding video

imagemagick handles batch image operations (such as compression) pretty well

try something among the lines of

https://unix.stackexchange.com/a/38380/269525

https://stackoverflow.com/a/7262050/1858363

imagemagick handles batch image operations (such as compression) pretty well

try something among the lines of

https://unix.stackexchange.com/a/38380/269525

https://stackoverflow.com/a/7262050/1858363

- Sat Apr 21, 2018 11:39 am UTC
- Forum: Computer Science
- Topic: Analysis of the Java RNG
- Replies:
**4** - Views:
**3363**

### Analysis of the Java RNG

Given a seed, the java code for setSeed is: seed = (seed ^ 0x5DEECE66DL) & ((1L << 48) - 1) The code to get the next n bits is seed = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1) result = (int)(seed >>> (48 - n)) And finally the code to get the nextLong (which is 64 bits) is result = ((lo...

- Sat Apr 21, 2018 11:29 am UTC
- Forum: Computer Science
- Topic: Formally, What is P and NP?
- Replies:
**19** - Views:
**8551**

### Re: Formally, What is P and NP?

There are two equivalent formulations of NP -- the verifier and the machine definition (2.1 and 2.2 on the wikipedia page). I prefer the machine definition because I think it's pretty quick to intuit: the N in NP stands for non-deterministic, so imagine being able to write computer programs with a s...

- Sat Mar 17, 2018 1:16 am UTC
- Forum: Mathematics
- Topic: Ordering a real interval with countable predecessors - possible?
- Replies:
**3** - Views:
**3595**

### Re: Ordering a real interval with countable predecessors - possible?

If you take all the ordinals with at most ℵ 0 predecessors, you have ℵ 1 of them (the next larger cardinal). This was the unintuitive part for me. Here's a proof I tried to put together, although I've never worked with ordinal numbers before. Suppose the cardinality of the set X of all ordinals wit...

- Fri Mar 16, 2018 11:55 pm UTC
- Forum: Mathematics
- Topic: Ordering a real interval with countable predecessors - possible?
- Replies:
**3** - Views:
**3595**

### Ordering a real interval with countable predecessors - possible?

In the second to last section of this page -- with the puzzle, a claim is made that assuming the axiom of choice and the continuum hypothesis, you can order the real numbers in [0, 1] so that each number only has a countable number of predecessors. https://www.scottaaronson.com/democritus/lec2.html ...

- Fri Mar 16, 2018 6:05 am UTC
- Forum: Computer Science
- Topic: Looking for an algorithm to test for abridgement
- Replies:
**3** - Views:
**3967**

### Re: Looking for an algorithm to test for abridgement

Here is a first attempt: Name the words of the book as X_i for the ith word in the first book (which contains underlined words), and Y_j for the jth word in the second book. Let U(i) denote whether X_i is underlined. Define A(i,j) to be a boolean function such that A(i,j) is true when X[i:] can be a...

- Wed Feb 28, 2018 3:14 pm UTC
- Forum: Computer Science
- Topic: Noam Chomsky Has Weighed In On A.I. Where Do You stand?
- Replies:
**4** - Views:
**4625**

### Re: Noam Chomsky Has Weighed In On A.I. Where Do You stand?

have some sort of planner (can be hard-coded OR learned) It's the ones that learn that are the powerful (scary) ones. If I want to open a box, I quickly come up with a plan (grab the scissors, cut the tape... How did you come up with this plan? Would you have come up with this plan the first time y...

- Wed Feb 28, 2018 2:54 pm UTC
- Forum: Coding
- Topic: code for melting computer
- Replies:
**7** - Views:
**7847**

### Re: code for melting computer

So it does seem that GIMPS's prime finding software using AVX can easily send processor temperatures to 98 C in a few seconds. The only other code i've run which does the same thing is some rendering software written in pure java (but which I suspect makes use of AVX under the hood of the JVM). Norm...

- Sun Feb 18, 2018 6:15 am UTC
- Forum: Computer Science
- Topic: Noam Chomsky Has Weighed In On A.I. Where Do You stand?
- Replies:
**4** - Views:
**4625**

### Re: Noam Chomsky Has Weighed In On A.I. Where Do You stand?

From my very limited knowledge of the field, neuroscience research has a very long way to go before we can anything in the way of usable intelligence out of it. A hilarious paper about this is Could a Neuroscientist Understand a Microprocessor? (answer: probably not). A purely statistical approach i...

- Fri Feb 02, 2018 5:51 pm UTC
- Forum: Computer Science
- Topic: Finding a subgraph with given properties.
- Replies:
**3** - Views:
**4303**

### Re: Finding a subgraph with given properties.

So it looks like if you map vertices onto products and sets onto processes, (you need to have at least one parent process per product, and you need at least one set to cover each vertex), you can reduce the problem of minimizing non-leaf nodes into set cover, which is NP-hard and can't be approximat...

- Wed Jan 31, 2018 8:40 am UTC
- Forum: Mathematics
- Topic: Mathematics of p-hacking: random walks and significance
- Replies:
**9** - Views:
**6849**

### Re: Mathematics of p-hacking: random walks and significance

I agree with the examples you gave.

I've figured out where I was confused now. I had the wrong definition of limit in my head. So e^k * cos k is an example of a function with no limit as k -> inf, but the lim sup would be infinity.

I've figured out where I was confused now. I had the wrong definition of limit in my head. So e^k * cos k is an example of a function with no limit as k -> inf, but the lim sup would be infinity.

- Wed Jan 31, 2018 3:00 am UTC
- Forum: Mathematics
- Topic: Mathematics of p-hacking: random walks and significance
- Replies:
**9** - Views:
**6849**

### Re: Mathematics of p-hacking: random walks and significance

I'm a bit confused by that. I'm under the impression if lim n -> inf of f(n) = infinity, then it means for every w, there exists n such that f(n) > w. according to wikipedia, lim sup is defined: https://wikimedia.org/api/rest_v1/media/math/render/svg/62cb7e298ae5b1647e0b64b9012c6012a2545b30 so this ...

- Mon Jan 29, 2018 8:37 pm UTC
- Forum: Mathematics
- Topic: Mathematics of p-hacking: random walks and significance
- Replies:
**9** - Views:
**6849**

### Re: Mathematics of p-hacking: random walks and significance

I recently had the same question, and after a lot of searching, dug up these two links: https://mathoverflow.net/questions/6444/how-long-for-a-simple-random-walk-to-exceed-sqrtt https://math.stackexchange.com/questions/210131/how-should-i-understand-the-sigma-algebra-in-kolmogorovs-zero-one-law/2101...

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

### Re: periodicity in LCGs

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.

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.

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

### 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:
**4172**

### 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:
**7847**

### 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:
**4211**

### 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:
**4211**

### 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:
**4211**

### 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:
**4211**

### 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:
**4211**

### 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:
**4211**

### 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:
**2564**

### 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:
**2564**

### 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:
**2564**

### 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:
**2564**

### 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:
**2564**

### 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:
**1894**

### 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:
**12071**

### 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:
**12071**

### 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:
**2415**

### 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:
**12071**

### 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:
**12071**

### 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:
**2415**

### 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:
**2391**

### 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:
**11860**

### 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:
**6749**

### 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...