Jump to content

moth

Senior Members
  • Posts

    578
  • Joined

  • Last visited

Posts posted by moth

  1. Is the creationist view that complexity only arises by deliberate action? How can they account for the complexity of a creator.
    I find it hard to understand why a complex universe needs a creator but a creator which must have equal or greater complexity than the universe can pop into existance from nothing.

  2.  

    //I can get pretty close with linear approximation, but I don't know how to say it in Math.
    #include "stdio.h"

    //f(x) = f(a) + f'(a)(x - a)

    int main(int argc, char *argv[])
    {
    float X = -2; //startpoint a=(-2,0)
    float slope = -2; //f'(a)
    float Y =0; //f(a)
    float dx=0.01; //interval

    printf("%f\n",Y);
    for(X=-2;X<=2;X+=dx){
    Y = Y + slope*X*dx;
    printf("%f\n",Y);
    }
    return 0;
    }

     

     

    Thanks for another enlightening challenge!

  3. Well, I'm stumped.I was hoping to use the slope of the tangent ( m ) with y = mx + Constant to get the derivative of the parabola at (x,y). Right now I'm trying to get Python to plot it in matplotlib
    but mostly just reading the documentation for matplotlib.

    I'm looking forward to seeing your solution.

  4. What do folks think, is this portrayal of the current situation accurate?

     

    http://www.nytimes.com/2013/10/14/opinion/krugman-the-dixiecrat-solution.html

    Even if there are enough "moderate" reverse-dixie republicans willing to allow the country to pay it's bills, John Boehner told George Stephanopoulis he felt Obamacare was so dangerous that he'd rather shut down the government than take the chance people may like it. The metaphore that occurs to me is shooting somebody to prevent their attempt at suicide. But only if you buy the argument that A.C.A. is bad for the country.
    We've been trying trickle-drown reagonomics for 30 years now, can't we try affordable healthcare for a year or two?
  5. Surprising! biggrin.png

     

    The opening speech left me with the general feeling I get about the tea party: what exactly are they protesting?

     

    Regarding the gun rights activists, I am left to wonder why this guy feels his gun rights are threatened when the current government has done nothing of the sort.

     

    Should I be surprised no one is protesting against the government asking us to quarter soldiers?

    I apologize for my previous contribution to this thread. I wasn't allowed in english class when I was in high school.

    I just couldn't let this pass unnoticed:

     

    quarter sodiers

  6. Is it possible to model refraction using General Relativity ?
    If you assume local speed of light inside a low refractive index material to be c, and find the length contraction and time dilation for an "outside observer",could you work out the local curvature?

  7. The answer to the conjecture is beyond me, so if one of us solves it that would probably be you or md.
    I was looking at how long the even-odd-even-odd pattern needed for fastest growth of n could be sustained, and if some property of multiples of two, when constrained by the 3n+1 rule, might interfere.
    +1 for the question and 1 for your exposition of your analysis.

  8. Thanks Daedalus, I'm glad I may be not too far off the track.
    The output from the first post was showing how long the longest hailstone sequence is for the starting values between 1 and 10, 1 and 100, etc.
    The output shows (IF i didn't pooch it) that the longest hailstone sequence found for initial values less than 10000000 is 686 iterations long (for the number 8400511 not shown)

  9. The comments in the code are not correct(apologies). I started this and then houseguests showed up...
    This is the first 10 lists. they seem ok

    #!/bin/usr/python
    MAXARG = 10
    ## itlist: return a list of iterated values for the argument
    def itlist(val):
    tlist = []
    n=val
    while n > 1:
    tlist.append(n)
    if n & 1:
    n = (3 * n) + 1
    else:
    n = n/2
    tlist.append(n)
    return tlist

    ##========================================
    ## Find the length of the iterated values lists for 1 through MAXARG

    countList = [] ## list to hold list length for iterated values from seed
    listLen = 0 ## number of iterated values on list
    seed = 1 ## seed value to generate list
    pow = 10 ## threshold value to check length
    max = 0
    while seed <= MAXARG:
    iterVals = itlist(seed)
    listLen = len(iterVals)
    print iterVals
    countList.append(listLen)
    if listLen > max: max = listLen
    if seed == pow:
    ## print pow,max
    pow = pow * 10

    seed = seed + 1


    OUTPUT:
    [1]
    [2, 1]
    [3, 10, 5, 16, 8, 4, 2, 1]
    [4, 2, 1]
    [5, 16, 8, 4, 2, 1]
    [6, 3, 10, 5, 16, 8, 4, 2, 1]
    [7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]
    [8, 4, 2, 1]
    [9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]
    [10, 5, 16, 8, 4, 2, 1]

  10. ## I lack skills to do any kind of formal analysis but it is an iteresting question it seems obvious that every list should end, but I couldn't prove it!
    ##If I didn't make a mistake, this should calculate the lists for every number 1-MAXARG
    ##save the length of the list of iterated values in a list of lengths
    ##print out the length of the longest list encountered at powers of ten (longest list of iterates from interval 1-10,1-100,1-1000 etc.)
    ##With a little modification, the code will also print the lists of iterated values (print iterVals)
    ##

    MAXARG = 10000000



    ## itlist: return a list of iterated values for the argument
    def itlist(val):
    tlist = []
    n=val
    while n > 1:
    tlist.append(n)
    if n & 1:
    n = (3 * n) + 1
    else:
    n = n/2
    tlist.append(n)
    return tlist

    ##========================================
    ## Find the length of the iterated values lists for 1 through MAXARG

    countList = [] ## list to hold iterated values from seed
    listLen = 0 ## number of iterated values on list
    seed = 1 ## seed value to generate list
    pow = 10 ## threshold value to check length
    max = 0
    while seed <= MAXARG:
    iterVals = itlist(seed)
    listLen = len(iterVals)
    countList.append(listLen)
    if listLen > max: max = listLen
    if seed == pow:
    print pow,max
    pow = pow * 10

    seed = seed + 1

     

    output:

    10 20
    100 119
    1000 179
    10000 262
    100000 351
    1000000 525
    10000000 686

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.