What exactly are you trying to do here? There isn't any reason to think that two or more seed parameters will be any better than a single well chosen seed. Since any random number generator basically produces a repeating (but repeating with a HUGE period) sequence that looks random, and since seeding the generator just tells the RNG where to begin iterating through that sequence, passing in multiple values won't get you anything better than passing in a single numerical value. Without knowing more about what your goal is, I would say to just use one parameter, or combine them into a single seed value, or something like that.
Nathan Addy
Posts
-
PseudoRandom functions in C++ -
Mine Is Longer Than YoursTrue, but if that's the case, the Amazon has been beating the Nile for years. With the length, it just makes it official. The Nile has completely had its (third) leg swept out from under it.
-
runge KuttaRK is used for approximating solutions to differential equations, which don't really have anything to do with fractals. Do you have any particular reason to try and program something using Runge-Kutta or fractals? If you explain what you want to do a bit better, I might be able to point you in the right direction.
-
Please helpSuppose you have a function describing position of a particle in meters at a time: f(t) = e^(3t^2) Then, as you say, the first and second derivatives will be the position: v(t) = 6 t e ^(3t^2) and a(t) = 6 e ^ (3t^2) + 36 t ^2 e ^ (3t^2). To see how displacement works, plug in some values: f(0) = 1m f(.5) = 6.351m f(1) = 120.513m So in the first .5 seconds, the particle is at position 6.351m, but since it started at position 1m, it has only traveled a distance of 5.351m. I don't want to give it away, so I won't say more, but that should give you an idea of how to figure out the problem.
-
Circular shiftingSorry to butt in here, but I'd recommend the book "The C++ Standard Template Library: A Tutorial and Reference" by Josuttis for exactly that purpose. There are several chapters you can skim and get a good sense pretty quickly as to what's in the STL, without being bored to tears. It also has lots of good examples and discussions and things like that. I've looked into a couple books in the past, trying to do exactly what you're talking about, and that one towers over the rest, IMHO. Excellent stuff.
-
[Message Deleted]I think a knowledge of both is integral (along with various other studies) to being a true, thoughtful, 21st century renaissance (wo)man. I've always admired traditional classical education very much, with its emphasis on the connectedness of the tree of knowledge (and which culminates in theology, as you mention). What Berlinski is looking for is a comprehensive education (and I am really racking my brain for a good word to call this but am drawing a blank) that reflects a modern "best-understanding" of the world from top to bottom. He, like everyone else, is hoping to answer the questions: "Who am I?", "What is my place in the world?", and then "Given that knowledge, what should I do with myself?" Physics is as integral to the whole tree of knowledge as anything else, but as a foundation. It sets the stage, by answering the first two questions, so that people can intelligently think about the third question. But my understanding of his comment was that he was shocked, or disappointed, or something that physics couldn't answer #3 directly. And that's what I took issue with. To fall back into corny metaphor, you can't begin to build a house without a foundation, but to expect that foundation to keep the rain off your head, and then fault the foundation for not doing so, is lunacy. Science describes, philosophy prescribes, and we need both, but let's not try to apply the disciplines to things they were never intended to do.
-
Prepare for the InvasionI just don't think the idea of resisting is remotely realistic, I don't care how much advanced, top-secret R&D is developed. If the Martians want us dead, we're dead. You're talking a minimum (but probably a lot more) of probably 500 years of scientific advancement past us, and they have first strike. To use a silly metaphor, it doesn't matter in the slightest how much advance warning a big band of caveman has that some small elite troop of 21st century commandos is coming. No amount of "top-secret super-spears" is going to make a difference. For instance, they could park their UFO behind the moon and lob nukes at us (or maybe they could sit just outside our solar system and do the same). We couldn't stop those bombs, and we wouldn't even be able to fire back. We would simply be helpless. Insurgencies only work when the opposition doesn't want to kill everything that moves (the US could easily end the insurgency by dropping a few nukes on Iraq for example), and I think that for a separate, far more advanced species that has traveled dozens of light years at minimum to fight us, the assumption they wouldn't just want to destroy everything that lives is a big one. Furthermore, I dont' think the idea of reverse engineering their weapons is sound. (For the moment, I'll even assume no factory or plant has been touched in the attack, which itself is a bold assumption.) I can't think of a single example of a piece of modern day technology that you could take back 500 years and have people begin building it in any kind of speedy manner. If you took an ipod back to the middle ages, what could they do, even if (completely unrealistically, as the ipod is built on 500 years of physics they don't even have) they understood it's operation completely? Even just for the plastic casing and chips, you'd have to go out and start producing oil (which obviously requires an entire industry of its own), finding and preparing silicon, building small chip fabs in order to generate the infrastructure to build larger chip fabs, etc, etc. Just the materials and production capabilities alone would probably make it so it would be 100 years before the first ipod could roll of an assembly line, even if everyone knew exactly what they were doing and pursued it with incredible focus. But that said, I wouldn't worry about it. I think the human race is far, far more likely to destroy itself in the next 100 years than the aliens coming to do it for us. Those problems seem to be a lot more relevant, and we might actually be a
-
[Message Deleted]How do you define "a theoretical arch sustaining enough to provide a coherent system of thought and feeling"? Depending on your answer, I'd probably agree with you. But that said, I would be of the opinion that going into theoretical physics (and speaking as someone who almost became a theoretical physicist) is the wrong place if you want theoretical arches that sustain enough to provide a coherent system of thought and feeling (I'd suggest philosophy). Only a very foolish person would say that a knowledge of physics hasn't been critically important to our way of life, but if you don't feel that current physics, with its small handful of equations describing the universe, provides that theoretical arch, why would you feel that combining that handful of equations into one bigger, more complicated equation would do it? Science, and physics particularly, is merely descriptive -- it just says what is. You want something prescriptive, something to tell you how to live your life, go to an ethics class (or church). They are working very hard on theoretical arches which provide coherent systems of thought and feeling (my impression is that they aren't doing a terrible job of it either.)
-
Prepare for the InvasionSeems kind of silly. My opinion is that if any alien species that has the technology to get here can blow us away comically easily, so much so that the idea of any resistance is ludicrous. Here's one way it could go down. Suppose the aliens are 10 light years away and can travel .1 times the speed of light. They steam off from their planet towards earth, and fire a probe filled with germs towards the earth just a little faster than they are traveling. Probe hits earth a couple years before they land, and when they show up, all living things are dead (an RNA munching virus maybe). There would be no fight or anything. The only thing that is potentially unrealistic here is that our biochemistry would be similar enough to the martians that they can know what bugs to design. (But the design itself isn't a huge deal - humans should be able to make something that potent within the next 100 years I would think). It'll be several hundred years at least before we can go to the stars. So anyone who comes to attack is is going to be many hundreds of years at minimum (but say, uniformly distributed between 500 years and 100,000 years ahead of us). The Iraqi insurgency is only about 40 years technologically behind the US, and likely less. And reason they are a force is because we don't want to exterminate the country. If we were either in the business of truly and utterly destroying the country, or in making slaves of the population (although I think this scenario is unrealistic too), we would have no problems at all. In reality, I doubt we have much to worry about. I suspect plenty of intelligent life gets started in the universe, but I don't think any of them would be likely to survive more than a couple hundred years, at best, past their technological beginnings (for humankind, I'd set that date at about 1850-1900). Needless to say, I think we've got much bigger things to worry about than the possibility of an alien attacking.
-
Second coming of JesusUg. Apologies for messing that up. This is actually one of my problems with wikipedia: there isn't typically a good overview of different religions. This would be the second time (Buddhism the first) that wikipedia has more or less overwhelmed me with details, and failed to provide a good, relatively simple overview. So my mistake about Vishnu (although wikipedia did do some "maybe Kali=Vishnu, maybe she doesn't" obfuscation on me). About the "destruction" though. My understanding was that Vishnu is constantly destroying the world (once every time Brahman sleeps), and which is then constantly rebuilt (every time Brahman wakes). So my understanding is that it's in no way a negative thing, and is just a natural part of the way the world works (more like going to sleep/waking up than destruction/creation). Is this even close to right, or has wikipedia done it to me again? Is it even Shiva who is the active force of the destruction, or is it Kali, acting on behalf of Shiva? I'm so confused!!! :-D
-
Second coming of JesusI'd be surprised. Frankly, since I'm an atheist and don't really expect the second coming anytime soon (and since presumably if *anyone* comes down out of the clouds I'm in trouble), I'm pulling for Shiva to show up (my apologies if I am misrepresenting the cosmological cycle in Hinduism, I probably am). Imagine it -- you walk outside, enjoying a nice spring day, la la la. Suddenly, a rift is cut in the fabric of space and time, and with her necklace of skulls and human entrails, Shiva pops out just in time to end the world. I think the expressions on the entire population of the US, expecting a white man (Jesus was white doncha know?) and instead getting a woman of color, would almost make the whole thing worthwhile.
-
Nintendo WiiAfter playing Wii Sports *at length* with a friend, I picked up Tiger Woods, hoping it would be more of the same but with a little more depth. I think it would lose some of its luster as a single player game, but for multiplayer, its the best I've found so far. I've played a little Excite Truck, which was ok, and a little Tony Hawk Downhill Racer (or whatever it's called), which I thought was poor. Other than that, my friend has played a little Zelda, which he says is really good, but doesn't have time to play (my impression is that if you don't have AT MINIMUM 10 hours a week to play it, it isn't really worth it. You'll lose track of where you're at. And even then it will take about 2 months, I hear, to beat it. If you do have that time, my impression is that it's one of the best you'll ever play.) He's also been playing and enjoying Paper Mario quite a bit, I think. But from my perspective, Tiger Woods is the only one so far that is really a must have for me. Highly recommended, especially if you have a partner you can multiplayer with.
-
Holiday of a lifetimeThis might not apply, but especially as it sounds like your dad might have been a real traveler/adventuresome type, I'd figure if there was one crazy place he had wanted to go to but didn't. If, for example, he always wanted to go on safari in africa, or whatever, than doing that could be damn cool -- a killer vacation with a little spiritual gravy so to speak. Otherwise, I'd recommend checking out Thailand or Bali (if you look, you can get deserted beach type stuff for CHEAP in both those places). Fly through Tokyo and check that out for 2 or 3 days too on the way there if you haven't ever been. Anyway, wherever you end up going, have the time of your life.
-
Random Numbers: Is there anything really random?It's an interesting discussion, and to really get into it, you have to define what random means. Every physical system has various numbers attached to it, which are the things you can "measure" about that system. So a flying plane, for example, has numbers like "momentum", "position of the z axis", "acceleration", etc. Furthermore, these values aren't completely independent. If you know the "momentum" and "acceleration" at time 0, you can make a really good guess for the momentum at future times (with guesses for sooner times better than future times). The implication would be that for a physical system, there is a "purely mathematical" part, that describes the abstract system. There is also a random part added in though. This implies that the physical system is somewhat random. So if the velocity of a falling block is 0 at time =0 and it's acceleration is -g, then you can make a solid guess as to the velocity at t=1.0 seconds -- it won't be random at all. However, if you factor out the mathematical part, you'll get a purely random part. So if, for instance, you expected the velocity at t=1 to equal -g meters/second, you could sample the actual velocity at t=1 and would get a Gaussian out. In the real world, this particular example has a very strong physical/mathematical component and a very small random component. On the other hand, with various quantum mechanical systems, it has been proven that the "physical/mathematical" component is 0, and the answer you will get out is completely random. So I disagree with you that people are a good source of randomness. You can ask someone to give you 100,000 random numbers between 0 and 100 and you'll find that the output is very non-random. In my interpretation, this reflects some "laws of the mind" that are totally non-random (the fact that I really "feel" 17 is random, and "1" is not would be one example). That said, if you were able to figure out the physical laws, you can factor those out and get something purely random out. So a physical law of the brain would say that I feel "17" is so random, I will pick it 10% of the time, as opposed to 1%, but whether in a particular run I pick it more or less than exactly 10% will be completely random. So if you want to find purely random numbers, pick a physical system. Either pick one that has no relationships between it's variables -- these are found mostly in quantum mechanical systems -- and are really completely random, or pick one where you know the physical system perfectly and factor out
-
Some Fun :)Nice. Mine is Tokachirikato Katefu. Actually, I was just in Japan a couple times over the last 4 months or so, and while I was there I had someone translate my name into Japanese. I don't know how it's pronounced, but the meaning was honestly "Lucky and sexy Asian mountain #7". :laugh:
-
Fred T.Red Stateler wrote:
those are overwhelmingly committed in the home and would therefore be negligable on campus
Slight addendum to your statement here. I'm not sure myself about crimes of passion, but "overwhelmingly committed in the home" certainly sounds reasonable for society at large. However, on college campuses you'll have roommate situations (and college-style too, where it is often two random people stuck together), which are rare in society at large but very common on campuses. Anyway, I suspect those situations would be prone to crimes of passion (probably not more than in-home crimes of passion, but more common than in most other setups, I'd imagine). Second, although I doubt accidental gun deaths would be so high as to invalidate any arguments, I'd imagine that Universities could skew slightly high on accidental deaths as well. My guess is that if there is anyone who is prone to not respecting guns and improperly handling them, I'd think it would be college kids (think drunk frat guys at parties). So just guessing, I'll say you're off by a factor of two in accidental gun deaths, and I'll say the same for crimes of passion (although that is REALLY pulled out of the air). So that brings the number down to ~40 years. (A little under one a year, which seems very reasonable at a large campus).
-
QuestionRed Stateler wrote:
Fundamental rights exist to ensure democracy, not to ensure personal liberty, which is the antithesis of democracy.
I think this is going to be a premise that will disqualify our continuing this argument. I just disagree, plain and simple. My own reading of the DoI/Constitution strongly suggests belief in natural law. "They are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. — That to secure these rights, Governments are instituted among Men." From my perspective, the meaning is clear. The basic rights exist in a place beyond governments, given by God and nature, and are basically fundamental rules of the universe. The only reason that government exists is because those rights can be violated, and institutions need to protect them. So I personally feel that personal liberty is the whole point of democracy -- to maximize everyone's personal liberties while ensuring that your liberties don't infringe on mine. If we didn't have a priori natural rights outside of government, we wouldn't need government at all. So this is a big, big fundamental difference between our two views. As for me not providing evidence, I think I have. Tertiary judgments are "actual" law, and past precedent is all the evidence needed, as far as I'm concerned (as well as to every judicial scholar around) -- we all know that privacy is not explicitly mentioned in the constitution, so obviously I'm not going to be able to come up with non-interpretative evidence. But the same could be said of the "right to life" (along with the right to the pursuit of happiness, the right to be intimate with your wife, the right to freely enter into contracts, etc, etc.). I have no doubt that if congress somehow passed a law making random killings legal, the supreme court would easily be able to knock that down (using that same due process clause). What can I say? Clearly I believe the constitution has to be interpreted; I don't see how any person could think otherwise (at least without also acknowledging that american citizens have no fundamental rights to travel, to marry, to life, to pursue happiness, to privacy). To me, the Constitution leaves out all of the "natural rights". It's a legal framework of "unnatural rights", that has been designed to ensure that "natural rights" are preserved. You have a right to life and a right to pursue happiness; but that occurs outside the fram
-
QuestionThis is getting ridiculous. I certainly never said that there weren't opinions that could be held, and arguments that couldn't be made against abortion. I saw PLENTY of fodder in my 30 seconds of investigation. For instance, due process is interpreted to give non-stated rights, but those rights (like all the rest) aren't absolute. Something was said about the government being able to curtail rights in a limited manner for specific purposes (can't yell fire in a theater)(freedom of association doesn't mean you can't get slapped with a restraining order)(etc). I could argue that neither of your quotes refer to privacy at all. My guess is that both White and Rehnquist believe in a right to privacy. What they seem to be arguing is against the ease of deriving new rights (right to abortion) based on old rights (right to privacy). As a "for instance", I believe in a right to privacy, but if someone used that as an argument for a right to not being taxed (they want to stay private enough that the government isn't even aware of them), I would disagree, and would say the exact same thing as the two dissenting Justices: that is a bad application of one right to incorrectly create another. But it would have no bearing whatsoever on whether the original right or privacy actually did exist or not. I don't necessarily think your opinions are wrong, just your facts. It is factually incorrect to state that the decision in Roe vs. Wade had nothing to do with privacy. It obviously had everything to do with privacy. You are certainly free to argue that the right to life (which you'll be interested to know is also not mentioned in the constitution) should take precedence over a right to privacy. That would be a fine argument. But of course that isn't what you did. You said that the "justification for Roe v. Wade was not privacy". You also said you had read the opinions. Any fool can plainly see that the decision in Roe vs Wade was based on an idea that the right to privacy implied a derived right to abortion. I have no choice to conclude that either you are lying about reading it, were unwilling to accept what you read, or unable to understand what you read. Since I assume you're a smart guy, and if you are capable of finding legal opinions online, are able to read and identify the word "privacy", I'll assume it wasn't an inability to understand. So either you are lying (which I doubt), or willfully ignorant. I've got no problem with you disagreeing with the decision; I do have a problem with you saying the d
-
QuestionI've got to run, but I'll write a more extensive response in a bit. For the moment, this is what jumped out.
Red Stateler wrote:
The Bill of Rights was designed as restrictions on government to prevent it from deteriorating into authoritarianism.
How does an interpretation of "due process" as implying natural law (which basically states that the government is not free to make *any* law it wants, even if it isn't expressly prohibited by the constitution. For instance, even though not expressly prohibited by the constitution, a law saying men and women could nevermore have sex would be unconstitutional; it's was outside the bounds of "natural law" and could therefore not be *due* process.) give more power to the government? Saying there are unenumerated things the government can't do, based on what your definition of "due" is, would seem to counteract government power, don't you think? ====================== BTW - it took me all of 1.2 seconds to find the opinion of the court... 3rd point held in the summary - "3. State criminal abortion laws, like those involved here, that except from criminality only a life-saving procedure on the mother's behalf without regard to the stage of her pregnancy and other interests involved violate the Due Process Clause of the Fourteenth Amendment, which protects against state action the right to privacy, including a woman's qualified right to terminate her pregnancy. Though the State cannot override that right, it has legitimate interests in protecting both the pregnant woman's health and the potentiality of human life, each of which interests grows and reaches a "compelling" point at various stages of the woman's approach to term. Pp. 147-164." A couple facts about the arguments in the case: "[Roe] claimed that the Texas statutes were unconstitutionally vague and that they abridged her right of personal privacy, protected by the First, Fourth, Fifth, Ninth, and Fourteenth Amendments." "[Roe's Physician] alleged that, as a consequence, the statutes were vague and uncertain, in violation of the Fourteenth Amendment, and that they violated his own and his patients' rights to privacy in the doctor-patient relationship and his own right to practice medicine, rights he claimed were guaranteed by the First, Fourth, Fifth, Ninth, and Fourteenth Amendments." Majority opinion "The Constitution does not explicitly mention any right of privacy. In a line of decisions, however, going back perhaps as far as Union Pacific
-
Image Recognition AlgorithmSo if you're not familiar (or comfortable with making yourself familiar) with complex numbers, this may be a little useless, but here is my first guess as to how to do it. You should be able to find a conformal mapping (look it up on wikipedia, it's basically a function that takes lines to lines and circles to circles, preserving angles, if I remember correctly), and I actually think you want a specific type of conformal mapping called a Mobius Transformation (also look that up on wikipedia - it's a function of the form f(z) = (az + b)/(cz+d), where a,b,c, and d are complex numbers and ad - bc != 0). Moreover, I think the function is just 1/z (where z is a complex number), but you'd want to double check that. Anyway, there should be a Mobius Transformation that will transform your image so that your concentric circles are mapped to parallel lines, which I would imagine would be much easier to find, especially if the concentric circles are regularly spaced out. From there, you could either find the center point on your mapped image, and then take its inverse under your Mobius Transformation to find the original point, or you could find the lines and map those back through the Mobius Transformation. Then you'd basically have explicit equations for each of the circles that you could use to find your center points. So check out these Mobius Transformations; if you've got the math background, I suspect they would make your problem much easier. Mobius Transformation followed by the basic Hough Transform referenced above (not the generalized form necessarily -- if you do that, you shouldn't have to do any of this MT stuff) should solve your problem, for instance.