## Search found 2058 matches

- Thu Jun 18, 2015 5:53 am UTC
- Forum: Coding
- Topic: Happy bases
- Replies:
**12** - Views:
**3045**

### Re: Happy bases

Find a more efficient algorithm to determine whether a number is happy in a given base. One thing I've noticed is that you immediately forget all previous calculations. If you've verified all numbers from 1 to n-1 to be happy, you only need to calculate the sequence for n until reaching any number ...

- Tue Jun 09, 2015 12:16 pm UTC
- Forum: Mathematics
- Topic: Independent repeated trials and mutually exclusive events.
- Replies:
**4** - Views:
**1635**

### Re: Independent repeated trials and mutually exclusive event

Mutually exclusive is just a fancy term for saying that there is no overlap between the events. For instance, if I wanted to know the number of people in my class who are either women or math majors, I can't add the number of women to the number of math majors because that would double-count all th...

- Sat Jun 06, 2015 4:24 pm UTC
- Forum: Coding
- Topic: Project Euler
- Replies:
**411** - Views:
**141537**

### Re: Project Euler

@jaap: Would you mind referring me to a simple memoized implementation of a factorial method in Java? That would probably help me a lot, just seeing how the memoization is implemented.... Actually, maybe I do know enough to implement it. I suppose you would have to have it in its own class so a fie...

- Wed Jun 03, 2015 2:53 pm UTC
- Forum: Coding
- Topic: Reflection around the inside of a circle
- Replies:
**4** - Views:
**2784**

### Re: Reflection around the inside of a circle

I always found it easier to do this kind of thing with vectors, I always make mistakes with trigonometric calculations. And calculating a normal vector for a sphere is really easy. I totally agree. In most languages I've seen, atan2 has the y parameter first, so reflectTangent isn't actually the ta...

- Tue Jun 02, 2015 10:41 pm UTC
- Forum: Mathematics
- Topic: Combinations algorithm and property
- Replies:
**19** - Views:
**2580**

### Re: Combinations algorithm and property

The loop part (that the last one is the neighbour of the first one) makes this tricky. Without that part I would solve it by methodically moving freespaces (assuming I didn't misunderstand something). That does indeed work as far as I can tell for a non-circular list. Here is some Java code that do...

- Tue Jun 02, 2015 3:19 pm UTC
- Forum: Mathematics
- Topic: Combinations algorithm and property
- Replies:
**19** - Views:
**2580**

### Re: Combinations algorithm and property

In other words - A set with n elements has nCk subsets of k elements. Find a way to put these subsets in a (circular) list such that each adjacent pair of subsets in the list have k-1 elements in common. Preferably find an algorithm that allows you to generate such a list. This feels a bit like a Gr...

- Tue Jun 02, 2015 11:52 am UTC
- Forum: Coding
- Topic: Project Euler
- Replies:
**411** - Views:
**141537**

### Re: Project Euler

This can overflow in that multiplication in cases where your version would not, but if you are worried about that you can use the gcf function to cast out common factors between i and c, and between i and (n+1-i) before multiplying, just like in your Fraction.times function. This is a great point. ...

- Tue Jun 02, 2015 8:07 am UTC
- Forum: Coding
- Topic: Project Euler
- Replies:
**411** - Views:
**141537**

### Re: Project Euler

Anyone see any holes in it? :) Not really. There are a few minor stylistic issues: a = 0-a; might as well be a = -a; , and I'd prefer that kind of statement to numerator *= -1; but those are just quibbles. You could also use a=Math.Abs(a); instead of if (a < 0) { a = 0-a; } . There really is no nee...

- Tue Jun 02, 2015 5:38 am UTC
- Forum: Logic Puzzles
- Topic: What number pen ??
- Replies:
**9** - Views:
**2867**

### Re: What number pen ??

Vytron wrote:Spoiler:

**Spoiler:**

- Mon May 25, 2015 9:25 pm UTC
- Forum: Mathematics
- Topic: Favorite math jokes
- Replies:
**1452** - Views:
**430609**

### Re: Favorite math jokes

I used to have a teacher in primary school that gave NP's for good work (nearly perfect) because nothing was ever perfect. Is there a joke here? I believe the joke would be that the teacher put "NP" when the student got all the correct answers, whereas in such a circumstance a...

- Fri May 22, 2015 12:57 pm UTC
- Forum: Science
- Topic: Bladeless Wind Turbine: Do joints look better than fans?
- Replies:
**17** - Views:
**2842**

### Re: Bladeless Wind Turbine: Do joints look better than fans?

Question: can it still be used during storms or heavy gusts? If so: big win for the windpole. Wind turbines have to stop during bad weather to prevent them from taking damage. I am not an engineer, but I'd have to say/guess yes, simply because there are no moving parts. There is nothing to turn off...

- Wed May 20, 2015 3:11 pm UTC
- Forum: Logic Puzzles
- Topic: Tricky geometric proof
- Replies:
**8** - Views:
**5110**

### Re: Tricky geometric proof

SPACKlick wrote:Your given has some display issues, could you reframe it in words?

Sandor's picture has all the info in. I couldn't see some of the characters in the OP either, but it was fairly easy to deduce they must have been the symbol for perpendicular, but that has now all been captured in Sandor's picture.

- Mon May 11, 2015 12:24 pm UTC
- Forum: Science
- Topic: reducing joules to elementary units
- Replies:
**5** - Views:
**1196**

### Re: reducing joules to elementary units

kinetic energy is 1/2 mass * velocity^2, or 1/2 kilograms * meters^2/seconds^2 wolfram alpha agrees: http://www.wolframalpha.com/input/?i=kg+m%5E2+%2F+s%5E2+in+joules except... where did the 1/2 term go? what happened to the coefficient? You are mixing up units and measurements expressed in those u...

- Sat May 02, 2015 7:56 pm UTC
- Forum: Mathematics
- Topic: Equations Like f(2x)=4f(x)
- Replies:
**8** - Views:
**3523**

### Re: Equations Like f(2x)=4f(x)

1. f'(x) = f(f(x)) These are called idempotent functions, and they're pretty important in linear algebra. Let y be a point in the range of f. Then there is an x in the domain such that f(x)=y. Then the idempotent condition means that y = f(y). Since y was an arbitrary member of the range, it follow...

- Mon Apr 27, 2015 5:30 pm UTC
- Forum: Logic Puzzles
- Topic: Can you solve this?
- Replies:
**3** - Views:
**3922**

### Re: Can you solve this?

It is pretty easy to solve using one of those online substitution cipher tools that gives you the letter frequencies and performs the substitutions you choose. The only tricky bit is the figuring out what the letter c should be, as that is not a normal word. darkness, entropy, time, transposition: t...

- Sun Apr 26, 2015 10:37 am UTC
- Forum: Mathematics
- Topic: Tetrahedron with equal heights.
- Replies:
**1** - Views:
**1020**

### Re: Tetrahedron with equal heights.

No. As the tetrahedron has a well-defined single volume, and its volume equals a third the height times the base, it follows that all four faces have the same area. One easy way to ensure all faces have the same area is to use four faces of the same shape. You can for example use the tetrahedron wit...

- Fri Apr 24, 2015 11:06 am UTC
- Forum: Mathematics
- Topic: Real roots of polynomials with integer coefficients
- Replies:
**10** - Views:
**1896**

### Re: Real roots of polynomials with integer coefficients

Is there a way to tell whether a polynomial has a multiple root without actually extracting the roots? Yes. If p(x) is the polynomial, then take its derivative p'(x), and then calculate gcd(p(x),p'(x)). If p has a multiple root, then that root will be shared with its derivative, and so this gcd wil...

- Thu Apr 23, 2015 3:40 pm UTC
- Forum: Science
- Topic: On friction
- Replies:
**17** - Views:
**2950**

### Re: On friction

You have the mass. That's all you need to find the force of gravity. Once you have that you can find the normal force. Once you have that you can find the force of friction. Once you have that you can calculate acceleration (or deceleration). Once you have that, everything else is easy! Nope, I hav...

- Tue Apr 21, 2015 8:45 am UTC
- Forum: Mathematics
- Topic: how to maximize number of beard states?
- Replies:
**8** - Views:
**2015**

### Re: how to maximize number of beard states?

The facial hair styles form a partial order . If style A shaved down into style B, you can say that A>B. There are pairs of styles that are not comparable, i.e. neither can be turned into the other because they both have some hair that the other doesn't. You can draw a graph, like the ones shown on ...

- Sat Apr 18, 2015 8:16 am UTC
- Forum: Logic Puzzles
- Topic: forget Cheryl's Birthday
- Replies:
**1** - Views:
**1713**

### Re: forget Cheryl's Birthday

We've had versions of this puzzle lots of times before: http://forums.xkcd.com/viewtopic.php?f=3&t=131 http://forums.xkcd.com/viewtopic.php?f=3&t=9308 http://forums.xkcd.com/viewtopic.php?f=3&t=45733 http://forums.xkcd.com/viewtopic.php?f=3&t=65980 http://forums.xkcd.com/viewtopic.ph...

- Wed Apr 15, 2015 3:29 pm UTC
- Forum: Science
- Topic: Earth's trajectory if the sun disappeared...?
- Replies:
**48** - Views:
**7255**

### Re: Earth's trajectory if the sun disappeared...?

I once did that same calculation for the moon (i.e. take twice the gravitational force it exerts to get the difference between when it's overhead and when it is opposite). This was in order to show that it would have virtually no effect on the blood circulation of a human being. It indeed wouldn't (...

- Wed Apr 15, 2015 9:48 am UTC
- Forum: Logic Puzzles
- Topic: Cheryl's Birthday
- Replies:
**29** - Views:
**5371**

### Re: Cheryl's Birthday

A slight tangent to the original question, but I know that the problem is asking what Cheryl's birthday is based on you being an outside observer to the problem. I was wondering if there's a way to work out how Albert was able to know the date based on him knowing that Bernard now knows the date. A...

- Thu Apr 02, 2015 7:37 am UTC
- Forum: Logic Puzzles
- Topic: Demonstrating objects are of equal weight
- Replies:
**12** - Views:
**4388**

### Re: Demonstrating objects are of equal weight

Zero. The problem can be solved without using a balance scale at all. 1. Weigh all the objects on a digital scale of sufficient precision and accuracy. 2. Weigh a single object on the same digital scale. 3. Divide the results. If the quotient equals the number of objects—meaning in particular it is...

- Tue Mar 31, 2015 5:04 am UTC
- Forum: Mathematics
- Topic: Math: Fleeting Thoughts
- Replies:
**378** - Views:
**101060**

### Re: Math: Fleeting Thoughts

Someone recently showed me a number (which I don't recall off the top of my head) which when multiplied by 2 or multiplied by 3 resulted in all the same digits, just rearranged. Is there a name for numbers with that property? Is there anything fancy being done 'under the hood' that makes numbers li...

- Tue Mar 24, 2015 12:34 pm UTC
- Forum: Fictional Science
- Topic: Super-Powers (Super-Speed!)
- Replies:
**73** - Views:
**13307**

### Re: Super-Powers (Super-Speed!)

Wait, is this true? If she's slowing time down, that means wavelengths will get longer; visible light would 'lengthen' into UV, and shorter wavelengths (like IR) would 'lengthen' into the visible spectrum. Unless I'm misunderstanding something? Infrared has a longer wavelength (lower frequency) tha...

- Thu Mar 19, 2015 5:28 pm UTC
- Forum: Language/Linguistics
- Topic: Can you help me identify this language?
- Replies:
**5** - Views:
**2997**

- Thu Mar 19, 2015 10:28 am UTC
- Forum: Mathematics
- Topic: Probability of K sequence of X heads out of N coin flips
- Replies:
**6** - Views:
**1663**

### Re: Probability of K sequence of X heads out of N coin flips

This is typically a problem where the Inclusion-Exclusion Principle comes into play. To be honest however, I would not even attempt to do this in this manner, because there is a complication that hasn't been pointed out yet. The K sequences of X heads and their tail separators don't always take up t...

- Fri Mar 13, 2015 7:12 pm UTC
- Forum: Logic Puzzles
- Topic: Ah! Help! How do you solve this? (Nim Variation I think)
- Replies:
**7** - Views:
**2167**

### Re: Ah! Help! How do you solve this? (Nim Variation I think)

If both Alice and Bob are playing optimally, what can you say about the relationship between the burnt piece and every cut performed? There is no reason to perform a cut that doesn't touch the side of the burnt piece. It would just leave more edible parts for the opponent. The burnt piece only ...

- Fri Mar 13, 2015 6:55 pm UTC
- Forum: Logic Puzzles
- Topic: Ah! Help! How do you solve this? (Nim Variation I think)
- Replies:
**7** - Views:
**2167**

### Re: Ah! Help! How do you solve this? (Nim Variation I think)

Hints: Consider only the squares that lie in the same row or in the same column as the burnt square, and ignore all other squares. Those squares as described in my previous hint form four lines radiating out from the burnt square. What does a move do to these four lines of squares? How many lines ca...

- Thu Mar 12, 2015 10:44 pm UTC
- Forum: Mathematics
- Topic: Generalizations of fibonacci
- Replies:
**4** - Views:
**1304**

- Sun Mar 08, 2015 4:29 pm UTC
- Forum: Mathematics
- Topic: Dice probabilities and King of Tokyo
- Replies:
**5** - Views:
**2131**

### Re: Dice probabilities and King of Tokyo

I didn't do any actual math, but my simulations show the answer to be a hair short of 14%. I was updating my previous post when you posted this. I just did a quick Monte Carlo simulation, and get answers much closer to the 19.7% that I calculated: 196565/1000000=0.196565 196636/1000000=0.196636 196...

- Sun Mar 08, 2015 2:16 pm UTC
- Forum: Mathematics
- Topic: Dice probabilities and King of Tokyo
- Replies:
**5** - Views:
**2131**

### Re: Dice probabilities and King of Tokyo

We realised that it's a 1 in 720 chance of rolling this result on the first roll No, it isn't. There are 6!=720 ways to make 6 different numbers out of the 6^6=46656 possible combinations of any 6 numbers. This is a probability of 720/46656 or about 1 in 65. With the re-rolls it is much more compli...

- Thu Mar 05, 2015 10:33 am UTC
- Forum: Language/Linguistics
- Topic: Misdeciphering unfamiliar words
- Replies:
**8** - Views:
**4141**

### Re: Misdeciphering unfamiliar words

But the misanalysis of misled imposes a different pronunciation – /ˈmɪzl̩d/ – whereas vernier is pronounced the same in either analysis. Is it? I pronounce 'vernier' as two syllables, but if I were to mis-analyze it as a comparative of *verny, I would pronounce it as three. But perhaps I'm incorrec...

- Wed Mar 04, 2015 5:34 pm UTC
- Forum: Language/Linguistics
- Topic: Misdeciphering unfamiliar words
- Replies:
**8** - Views:
**4141**

### Re: Misdeciphering unfamiliar words

I'm not so sure, as a Mondegreen is based on mishearing a word or phrase, so the erroneous word will sound very similar. This is about misreading it, like "misled".

- Sat Feb 21, 2015 7:13 am UTC
- Forum: Science
- Topic: [ASTRONOMY?] [MATHEMATICS?] [SF?] Trying to make log scale
- Replies:
**3** - Views:
**1480**

### Re: [ASTRONOMY?] [MATHEMATICS?] [SF?] Trying to make log sca

At this moment the factor between subsequent classes is 16. To split that factor into k subdivisions, you need to use the k-th root of it as the factor between those subdivisions. So if a class has the range M to 16*M, the subdivisions have the ranges M to M * 16 1/16 , M * 16 1/16 to M * 16 2/16 M ...

- Fri Feb 20, 2015 9:41 pm UTC
- Forum: Mathematics
- Topic: Permutation 'logarithm'
- Replies:
**4** - Views:
**1787**

### Re: Permutation 'logarithm'

Isn't this the discrete logarithm ? Yes, but: This is indeed the discrete logarithm, but in the context of a permutation group. I took this to mean that the elements p and k are expressed as permutations of some set of a reasonable size. Of course, every finite group G is a permutation group acting...

- Fri Feb 20, 2015 2:44 pm UTC
- Forum: Mathematics
- Topic: Permutation 'logarithm'
- Replies:
**4** - Views:
**1787**

### Re: Permutation 'logarithm'

I'm sure this can't be a new topic seeing how old group theory is, but my Google-fu has failed to turn up any relevant articles. Suppose you have permutations p and k , and you know that k = p n for some n, how do you find n without manually applying p n times? It is not really that different from ...

- Sun Feb 15, 2015 6:00 pm UTC
- Forum: Mathematics
- Topic: number of K digit numbers divisible by prime
- Replies:
**9** - Views:
**2156**

### Re: number of K digit numbers divisible by prime

What is the apporach if p is small?. Would like to hear it To quote the Project Euler FAQ: I learned so much solving problem XXX so is it okay to publish my solution elsewhere? It appears that you have answered your own question. There is nothing quite like that "Aha!" moment when you fin...

- Sun Feb 15, 2015 2:42 pm UTC
- Forum: Mathematics
- Topic: number of K digit numbers divisible by prime
- Replies:
**9** - Views:
**2156**

### Re: number of K digit numbers divisible by prime

I agree that this dynamic programming approach is the way to go. There is however a certain Project Euler problem about this in which k is very large relative to N, and then you need several more tricks to calculate the result. If p is also small compared to k, I think I might have an approach. It ...

- Fri Feb 13, 2015 2:23 pm UTC
- Forum: Mathematics
- Topic: number of K digit numbers divisible by prime
- Replies:
**9** - Views:
**2156**

### Re: number of K digit numbers divisible by prime

To move from one level to the next, notice that if an (i-1) digit number gives a remainder of r when divided by p and has a digit sum of s has a d appended to the front, then its remainder is r + d*10^i (mod p) and digit sum of s+d. You can do a little better [...snip...] It think it is easier to a...