Search found 41 matches

by drwhat
Sat Jul 02, 2016 1:04 pm
Forum: Number
Topic: Determining the size of an L-System string
Replies: 1
Views: 7293

Determining the size of an L-System string

I've been writing a program to play around with L-Systems (Lindenmayer System). https://en.wikipedia.org/wiki/L-system if your curious about them. I'd like to add a progress bar for higher order calculation, but to do that I need to develop a method to determining the total number of items that will...
by drwhat
Thu Dec 31, 2015 9:07 pm
Forum: Recreational
Topic: Gearbox Problem
Replies: 0
Views: 2219

Gearbox Problem

I am looking for help in either the math needed or algorithm needed to solve the following problem. A GearBox consists of an 8x8 grid. The columns are labeled A-H. Rows are labeled 1-8. You are able to place up to 15 shafts, that can hold up to 3 gears per shaft. Gears come in the following sizes: 1...
by drwhat
Fri Jun 26, 2015 6:54 am
Forum: Number
Topic: Help with Expected Value.
Replies: 1
Views: 7187

Help with Expected Value.

EV problems have always been the hardest for me to figure how to get a formula for them, esp open ended ones where the results are not guaranteed to happen. (e.g how many times do you have to pick a random number between 1-1000 before you choose a 1). So I have problem I'm trying to write an app for...
by drwhat
Tue Apr 16, 2013 1:14 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 173 & 174
Replies: 41
Views: 12189

Re: Problem 173 & 174

I was curious if anyone who had solved this could PM. I have solution for N(n) for 1 <= n <= 20. My N(15) matches 832 correctly but my summation of 1 to 10 seems off. I was wondering if could PM someone that list to see how far off i was.
by drwhat
Sun Feb 26, 2012 8:02 am
Forum: Combinatorics
Topic: Dice Rolling
Replies: 3
Views: 2940

Re: Dice Rolling

Heh of course your right. Very simple. Thank you for the insight, I've already solved my problem and sent one back. Though now that I've been thinking about this a bit, i'm wondering if there is an easy solution to the following: Say you have the letter sequence MISSISSIPPI. 1.How many ways can you ...
by drwhat
Sat Feb 25, 2012 6:12 pm
Forum: Combinatorics
Topic: Dice Rolling
Replies: 3
Views: 2940

Dice Rolling

Sadly mathhelpform seems to have gone down. I usually post such questions there, but thought I might try here. A friend and I like to pose various problems to each other. The most recent one I got was: What are the odds of rolling a dice n times without repeating a number. (i'm pretty sure this isn'...
by drwhat
Thu Feb 23, 2012 5:03 am
Forum: Game Theory
Topic: Blackjack dice game variant
Replies: 4
Views: 9846

Re: Blackjack dice game variant

What happens if player A reaches 21 and player B is at 10? If the answer is the game continues, and thus A's next roll will cause him to lose my gut instinct is B has the advantadge. The winning strategy for either player is to take the lowest numbered dice possible in each roll. This has a 2 effect...
by drwhat
Thu Feb 23, 2012 4:31 am
Forum: Geometry
Topic: Points, circumference and circles
Replies: 11
Views: 13253

Re: Points, circumference and circles

Posted a proof that it could only be 2 points, but I was assuming angle subtended by the points and center had to be rational. Which it does not. Given angle 106.26..and 73.73.. (the angles of a 345 triangle) you can place 4 points around the circumfernce all of which will be 6 , 8 or 10 units from ...
by drwhat
Thu Feb 23, 2012 3:50 am
Forum: Number Theory
Topic: Even numbers and twin prime
Replies: 3
Views: 2703

Re: Even numbers and twin prime

Well since for any prime p, φ(p) = p-1 your equation reduces to
2n =p*(q+1) - q*(p-1)
2n = pq+p-pq-q

2n = 2pq + (p-q) where p is any odd prime, and q is the smaller of a twin prime pair.

I'm not sure what else we could say about n in this situation to elimnate possible solutions.
by drwhat
Thu Feb 23, 2012 3:16 am
Forum: Geometry
Topic: Points, circumference and circles
Replies: 11
Views: 13253

Re: Points, circumference and circles

When you say distance do you mean the chord length between 2 points, or the arc length along the circumference?
by drwhat
Wed Feb 22, 2012 11:21 pm
Forum: Recreational
Topic: Recurring themes & tools
Replies: 3
Views: 2595

Re: Recurring themes & tools

I have a PrimeFactor Class, that can take a number and:
break it down into prime factors (and a count of each of those) (e.g 72 = 2^3*3^2 )
generate a list of all divisors (from which you can get a total number of divisors as well as sum of divisors)

I've used this in a number of problems
by drwhat
Mon Nov 28, 2011 11:10 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5079

Re: Reciprocal of 9899 and similar numbers.

Lucas Numbers: http://en.wikipedia.org/wiki/Lucas_number I guess those do fit the bill in a way. They are just the Fibonacci numbers where F(0)=2, F(1)=1 So far all the sequences generated by the formula I showed above have S(0)=1, S(1)=A where a = 9-middle number. I'll have to play around to see i...
by drwhat
Mon Nov 28, 2011 11:05 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5079

Re: Reciprocal of 9899 and similar numbers.

Just found a much faster, and cleaner way to generate the reciprocals. 1/(10^(2n)-A*10^n-1) will generate a decimal expansion of the sequence, in which each term is n padded digits: S(n) = a*S(n-1)*S(n-2). so for 2 digit length and fibonacci (a=1) we get: 1/(10^4-1*10^2-1) = 1/9899. for 4 digit Pell...
by drwhat
Mon Nov 28, 2011 10:33 am
Forum: Number
Topic: Reciprocal of 9899 and similar numbers.
Replies: 4
Views: 5079

Reciprocal of 9899 and similar numbers.

A while back I learned that the decimal representation of 1/9899 formed the fibonacci sequence. Specifically it equals .00010102030508... Of course as the numbers get larger they run over each other. However you can fix this by adding an equal number of 9s to the front and back. Any number of the fo...
by drwhat
Thu Nov 24, 2011 10:49 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 110
Replies: 6
Views: 2365

Re: Problem 110

I apparently have the uncanny ability to work on a problem for days or weeks, and then find the bug minutes after posting here :)
by drwhat
Tue Nov 22, 2011 6:02 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 117
Replies: 1
Views: 1262

Problem 117

To see the problem: Problem 117 (View Problem)

Always sad to have to be the person to start a new problem thread :)

Bah! Nothing but an overflow problem
by drwhat
Thu Nov 10, 2011 6:55 am
Forum: Programming languages
Topic: MPIR Question C++
Replies: 2
Views: 3150

MPIR Question C++

I recently got MPIR installed and have been using it with Visual C++, specifically with the c++ wrapper that has the mpz_class, mpq_class, and mpf_class. When I use the cumbersome mpz_t format, my numbers will increase to an arbitrary precision, but when I use the class wrapper, they act like _int32...
by drwhat
Wed Nov 09, 2011 10:56 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 091
Replies: 31
Views: 8392

Re: Problem 091

I think idea is well under answer, it was for 9. I don't actually enumerate every triangle. I thinking of all the possible triangles there could be.. Calculating the ones for which an easy formula was available, then using a program to enumerate the rest. If any solver is willing, I'd like to PM my ...
by drwhat
Tue Nov 08, 2011 5:09 am
Forum: Recreational
Topic: Missing Wedding Ring Finger
Replies: 15
Views: 12277

Re: Missing Wedding Ring Finger

Have you tried: The police weren't there? And/or he killed the man as well for no witnesses. In regards to lateral thinking puzzles. If you enjoy party games you might try to track down this one: http://www.boardgamegeek.com/boardgame/1254/crack-the-case Its a neat party game where players take turn...
by drwhat
Tue Nov 08, 2011 3:55 am
Forum: Geometry
Topic: Belts and Circles
Replies: 4
Views: 8970

Re: Belts and Circles

oh yah. so [theta1] = [theta2] that makes it simple to calculate.