?

Log in

LiveJournal for Jerry Federspiel.

View:User Info.
View:Friends.
View:Calendar.
View:Website (My tiny web home).
View:Memories.
You're looking at the latest 20 entries. Missed some entries? Then simply jump back 20 entries.

Thursday, July 29th, 2010

Subject:XY
Time:6:12 pm.
The ultrasound shows he's a healthy 13-ounce boy.
Comments: Read 12 orAdd Your Own.

Saturday, May 2nd, 2009

Subject:Distorted guitars and independence
Time:1:15 am.
I should be going to bed, but for some reason I'm still awake, so I should note something I found a few days ago.

But first, a little background. Why do amplified distorted guitars sound so interesting, and so different from most existing instruments? The strings themselves vibrate in ways that are very similar to the strings of an acoustic guitar (minor differences, but nothing important for this discussion). In both cases, the vibrations occur at several frequencies simultaneously. The beauty of distortion is what it does to the set of frequencies.

When an electric guitar's vibrations are picked up by their, um, pickups, they may be subjected to nonlinearities (so that if a string vibrates with twice as much amplitude as normal, it is not necessarily represented with an electric signal with twice as much amplitude). The really fun thing about a signal with multiple frequencies subjected to nonlinearities is that the set of frequencies you get out of the process is vastly enriched.

For every pair of frequencies present in the original signal, the output will contain not just the original pair, but also the sum of the original frequencies and the difference of the original frequencies. Those pairs of frequencies could be represented as distinct entries in a square table with as many rows and columns as there were frequencies in the original input, so by distorting your input you're basically squaring the number of frequencies present.

Now, distorting a plucked electric guitar string doesn't really end up squaring the number of frequencies present, because a lot of the entries in your square table of frequencies end up being duplicates. That's because the original frequencies present in the input are in a sense not very independent from one another: they are all pretty close to multiples of a single frequency (the "fundamental frequency") of the string that's vibrating. Taking sums and differences from a such a series of numbers produces a lot of duplicates (e.g. the frequencies 100, 200, 300 have sums and differences 0, 100, 200, 300, 400, 500, and 600) But you still end up generating plenty of new frequencies when you strum a chord, because when more than one string is vibrating, the entire set of input frequencies is no longer a boring set of multiples of a single fundamental.

One last note before moving on. Real distortion doesn't just introduce sum and difference frequencies; it also generates multiples of those sum and difference frequencies. A ton of frequencies can get generated with very simple input.

--------------------

Sorry that took a while, but that was all one chunk in my brain and so it's been used as a building block for thinking about other things. Which brings us to what I found recently.

Imagine trying to build a sequence of whole numbers that are as independent from one another as possible. Certainly, no number in the sequence should be a multiple of any other number in the sequence. Here's the twist. No number in the sequence should be a multiple of the sum or difference of any pair of multiples of earlier numbers in the sequence. We'll call such a sequence "maximally independent" (a term I just made up; the definition is essentially a kind of integer-flavored linear independence)

Let's say we started out with 2 and 3; they're not multiples of one another. Unfortunately, that's as long as that sequence can get. We can't add any more numbers to it, because 3-2=1 and any other number we could think of adding to the sequence will be a multiple of 1.

Because this post is already plenty long, I will conclude with two conjectures about these sequences, without rigorous proof (but I am nearly certain of both).

1. There is no maximally independent sequence that increases on to infinity. (Argument: consider the first/smallest element E of a candidate infinite sequence. What do the rest of the elements of the sequence look like modulo E? Suppose two larger elements of the sequence were congruent mod E, then maximal independence is violated; so every element of the sequence must be distinct mod E, but there are only E equivalence classes mod E, so the sequence is at most E in length!)

2. Maximally independent sequences of arbitrary length may be constructed. (I have a method, but I'm curious to see if anyone else comes up with one).
Comments: Add Your Own.

Thursday, January 8th, 2009

Subject:Ascending sequences
Time:10:46 pm.
A few minutes ago I realized the following (which I'm sure has already been well enumerated by mathematicians before):

cut for math...Collapse )
Comments: Add Your Own.

Sunday, October 26th, 2008

Subject:Linux and Flash sound
Time:2:50 pm.
One thing that hurt the Linux experience for me (until just now) was that Adobe's Flash plugin for Firefox on Linux couldn't produce audio.

To remedy this (assuming Ubuntu), go to System-Administration-Synaptic Package Manager, select "libflashsupport" for installation, and click "Apply". Tada!
Comments: Add Your Own.

Thursday, October 2nd, 2008

Subject:Abstraction: language as a tool for making tools
Time:12:41 am.
When we say that a tool is "easy to use", we could mean a few different things. We could mean "knowing nothing beforehand, I can pick up this tool and figure out quickly how to make it do what I want". Let's call that kind of ease "discoverability". We could also mean "if you know what you're doing, accomplishing what you want is made much easier with this tool." Let's call that kind of ease "usability".

The meaning that people most often have in mind with software is that of discoverability. I just opened this program, and I have something in mind that I want to accomplish, but I don't know anything about the program- does the program make it easy for me to figure out how to do what I want to do?

-------------- Cut for length...Collapse )
Comments: Read 5 orAdd Your Own.

Saturday, June 7th, 2008

Time:3:40 pm.
Wisconsinites, check your weather soon. Tornado warnings are in effect for southern Wisconsin.
Comments: Read 2 orAdd Your Own.

Saturday, April 5th, 2008

Subject:Random walk through the forest
Time:2:14 pm.
Each layer in this image was generated by the same method.

A graph (to a computer scientist) is a set of nodes and arcs connecting them. A tree is one kind of graph- a network with no loops in it. A "rooted tree" makes one node special- it's the "root"; for any node, the nodes connected to it that are farther from the root are called the "children" of that node.

Each layer in this image was generated with a tree. Each node in these trees had four children, except the nodes (because the computer only has a limited amount of memory) that have no children at all. Every node was reachable from the root node with at most eight jumps from node to node (a CS person would say the tree has a "depth" of eight).

Each node's four children had positions that were based off of the parent node. The generation of the picture starts out by plotting a point at the position of each node. Then the nodes get jostled a small amount (taking their children with them), and they are plotted again. Repeat this about 4000 times, and you get one of the layers used in this image. The process of taking a point and jostling it about by tiny random increments many times is called a "random walk".




And now, if you'll excuse me, I'll be off to take an actual walk with my Love.
Comments: Read 3 orAdd Your Own.

Friday, March 21st, 2008

Subject:Autism and vaccination
Time:12:16 pm.
For new parents or parents-to-be...Collapse )
Comments: Read 8 orAdd Your Own.

Wednesday, February 27th, 2008

Subject:Programs to write programs
Time:10:22 pm.
My computer has spent an hour and a quarter parsing 11 billion tokens in its quest to finish a very large simulation. I'm just hoping it doesn't crap out with an out-of-memory error before the render begins in earnest. I'm thinking I should've installed the RAM upgrade before starting this render.

But it didn't have to be this way.

Right now, the simulation is written as a program in the POVray language, which is inefficient for everything but graphics (this was partially done as an exercise to see if I could push POVray past its normal bounds). One thing that programmers often do is to write programs in one language whose only job is to write programs in another language. So I should've written the simulation in C/C++/Java, and had the output from the simulation be not a picture, but a POVray program that, when executed, would produce the picture. That would let the efficient number-crunchers like C/C++/Java do the simulating, and let POVray do the graphics. I believe this would be much faster, because the C-like languages could actually do the simulation in just about a minute, and then POVray would be given a file that would just tell it exactly what it needed to generate the picture.

You might be interested to know that you use programs generated by other programs all the time. Most modern websites have, on their servers, programs written in PHP/Ruby/Perl that will generate a mix of HTML and javascript. That mixture gets sent to your computer over the internet, and then your browser runs the javascript programs to finish generating the HTML (and on some sites like GMail, to keep the HTML updated without having to reload the entire page).
Comments: Add Your Own.

Monday, February 18th, 2008

Subject:Wisconsinites, your primary is Tuesday
Time:3:47 pm.
The Wisconsin Vote FAQ and a polling place finder.
Comments: Add Your Own.

Friday, January 4th, 2008

Subject:leukocyte extravasation, made purty
Time:6:35 pm.
Watch a pretty movie about the lives of cells, including a bit about the inflammation response.

And here they show the creation of ATP.
Comments: Read 3 orAdd Your Own.

Tuesday, January 1st, 2008

Subject:Happy New Year!
Time:12:00 am.
Comments: Read 2 orAdd Your Own.

Sunday, December 30th, 2007

Subject:Bird versus the police academy guy
Time:7:07 pm.
Observe, the coolest bird ever.

For those of you that prefer educational videos, you may wish to check this out.
Comments: Read 2 orAdd Your Own.

Thursday, December 13th, 2007

Subject:I figured something out on the bus yesterday
Time:9:53 am.
Just a quick note.

Say you had a network of resistors. If you find it difficult to reason about what the resistance of the network should be, here's a trick you can use (I think- I think with confidence of about 75% that it will be true for every case.) I have not proved this; it's just my intuition and a few toy examples so far.

Replace every resistor with a switch that could be open or closed. The Kth switch will be closed with probability p_K and open with probability 1-p_K. Figure out what the probability is that there is at least one closed path through the network. This will be some expression in terms of the various p_Ks.

Now, we're going to take your expression and change it so that it tells us about resistances instead of probabilities. Replace every multiplication with addition, and every minus sign with division. Replace every p_K with the resistance of the Kth resistor. Tada! You now have an expression for the resistance of the original network.

This gives us another avenue of attack when trying to understand the most recent xkcd comic.
Comments: Read 3 orAdd Your Own.

Saturday, December 8th, 2007

Subject:Swapping to scramble a list
Time:2:45 pm.
I just recently found out something that should've been head-slappingly obvious. It's kind of embarrassing. Here is some code that I thought scrambled an array with every possible scrambling equally likely:
For every item in your array,
   swap this item with a random element in the array

For each element in your array, there are N ways that the swap could happen. Since those swaps happen for every element (and there are N elements), there are N^N different possible combinations of choices this code could make. Each of those combinations is equally likely.

Since the combinations of choices are equally likely, any scrambling of the list that was produced by the code should be produceable by the same number of combinations. Any difference in the number of combinations that could produce a given scrambling would translate to a difference in the probability of that scrambling- which is not what we want.

If every scrambling could be produced by the same number of combinations, then the total number of combinations should be some multiple of the number of scramblings. But here's the catch.

That's only ever true once. The total number of scramblings of a list with length N is N!. N^N is only a multiple of N! when N=2. Ouch. Therefore, on any list with more than 2 elements, the above code will prefer some scramblings to others. Even if the code were doing its best, evenly spreading combinations of choices among scramblings, there would be a remainder, and that remainder would be distributed among some scramblings and not others, making those lucky scramblings more likely than others.

The real solution was given to us by one of the gods of computer science, Donald Knuth- just swap each item with a random element that comes after it. (Technically, Knuth's solution walks through the list backwards, but as far as I can tell, that's because when you do it that way, the only additions and subtractions that are done repeatedly are by 1, which can be done very quickly with minimal hardware) Now there are N! combinations of choices the software could make, and N! possible scramblings, each equally likely.
Comments: Read 1 orAdd Your Own.

Monday, November 19th, 2007

Subject:There once was a song about dropping plates
Time:9:00 pm.
Chladni plate! Basically, you take a plate of metal, put powder on it, and then vibrate the plate. At any given frequency, the plate wants to vibrate in the geometric pattern that best supports that frequency. For any given frequency, some parts of the plate move up and down a lot ("antinodes") and some parts of the plate don't move up and down at all ("nodes"). The powder gets knocked away from the antinodes, but it's not knocked away from the nodes, so it all ends up collecting on the nodes.

Also, my Lady was so awesome as to download the files from my student webspace (which was set to expire while I was in Kansas). I got some server space and my webpage is now up at jerryfederspiel.org.
Comments: Read 6 orAdd Your Own.

Monday, November 12th, 2007

Subject:Travelin' man
Time:5:16 am.
I'll be in Kansas until Thursday afternoon. After that, I'll probably be going to Milwaukee this weekend.
Comments: Add Your Own.

Thursday, November 1st, 2007

Subject:Quirk and the self-directed gaze
Time:11:43 pm.
Semi-recently (well, ages ago, in internet terms) Metafilter had an interesting discussion of quirk.

I don't have an account there, and it's way too late to comment there anyway. But here are my thoughts.

1. Garden State had its pros and its cons. Ian Holm was excellent, as always. The idea of defying a repressive family's culture and bringing feelings out into the open was good. Every last thing about Natalie Portman's character grated on me. The movie established a certain emotional realism with Braff and Holm; that realism was destroyed by glossing over Portman's grave character flaws as cute, funny quirks. And I sincerely hope that no one saw this movie and decided to quit taking their meds cold-turkey, thinking that it would be as consequence-free as Braff's experiment.

2. I was going to write more about some American subcultures' interest in or valuation of quirk, but I'm getting tired and there's not a lot that actually must be said. I think that self-conscious quirk is irritating in the extreme; I feel a little sorry for people that feel they have to adopt it because they don't know that it's okay to be dull, boring, and unfunny. None of that matters if you choose your principles with care, and fight for them. Maybe people would feel safer in living their lives, rather than assuming their poses, if they knew they were loved.
Comments: Read 2 orAdd Your Own.

Thursday, October 25th, 2007

Subject:1000 words
Time:1:32 pm.
This is a fairly dramatic statement of the severity of the fires in California.
Comments: Add Your Own.

Tuesday, October 16th, 2007

Subject:As-Tarkhan
Time:12:52 am.
The ghetto version of the game is on the web:
EDIT: now moved to my new web space.

Rules

Cards

Place mats


Here is a map of how the resources are related.
Comments: Read 4 orAdd Your Own.

LiveJournal for Jerry Federspiel.

View:User Info.
View:Friends.
View:Calendar.
View:Website (My tiny web home).
View:Memories.
You're looking at the latest 20 entries. Missed some entries? Then simply jump back 20 entries.