Search This Blog

Thursday, March 31, 2011

優柔不断

Interestingly enough, there is no Japanese equivalent to procrastination (優柔不断 comes close, which means indecisiveness).

This post is just an update as to what's to come. Next month will be my personal hell. I can only prepare so much ahead of time (This preparation in the form of doing homework a week before it's due). Doing 6 courses means 4 final exams, as well as a final English research paper (1500 words). In addition to a final chemistry lab midterm tomorrow, and a Biology lab final exam the following week.

But I did this to push myself to the limit, and see if I have what it takes for my ultimate goal. If I can't handle something as minute as this, then it's time to reconsider my life goal.

So in short, the in-depth posts that usually happen will be on hiatus next month. That doesn't mean I won't post everyday as my New Year's Resolution is intending (Which at this point, has probably lasted longer than most peoples' resolutions). It will be "clever" to say the least.

Tuesday, March 29, 2011

ルーンスケープの自然淘汰

In RuneScape, there's an area called the Herblore Habitat, which is a great example of Darwin's theory of natural selection.

The Herblore Habitat is home to 10 species of "Jadinkos" (Some reptile/dinosaur thing; for theory purposes just think about Darwin's finches) as well as 3 species of God "Jadinkos", but we will only consider the 10 species. The objective for the player is to hunt and capture at least one of each species. In order for the player to do this, they must alter the environment in order to attract a certain Jadinko species.

The player can alter the environment in 5 ways:
- Alter flower color (red, green, or blue)
- Apply Hunter Potion on flowers (essentially modifying the flowers, but this warrants its own section)
- Alter "habitat" (see below for list of habitats)
- Alter bush type (Kalferberry or Lergberry)
- Alter tree type (apple, orange, or banana)

The different habitats are listed below:
- Boneyard
- Abandoned House
- Thermal Vent
- Tall Grass
- Pond
- Standing Stones
- Dark Pit

The first Jadinko is the "common" kind; we could consider this the ancestor of which the other species have diverged from (Granted my terminology is rusty, since ancestors have to be extinct). These are the easiest to attract, requiring only flowers to be planted; any kind of flower at that.

The other 9 species have diverged from the common kind, each occupying their own niche. There is variation in the color of flower they prefer, what habitat they inhabit, as well as their food source (berries and fruit). Some species are even intelligent enough not to appear unless a special potion is applied to the flowers (Perhaps this potion has strong aphrodisiac effects to attract them). Below is a table of how to attract each kind.


Now I list the variation between the species
- 4/10 species require Hunter Potion

- 2/10 species are uninterested in flowers
- 3/10 species prefer red flowers
- 2/10 species prefer green flowers
- 2/10 species prefer blue flowers

- 2/10 species prefer the "pond" habitat
- 2/10 species prefer the "boneyard" habitat
- All other species occupy a different habitat

- 3/10 species are uninterested in berries
- 3/10 species prefer Kalferberries
- 4/10 species prefer Lergberries

- 7/10 species are uninterested in fruit
- The remaining 3 species each have a different fruit preference

If you look at the above numbers, you can conclude that there is absolutely no conflict in regards to niche.(although since the common Jadinko has no preference to anything may raise an eyebrow).

From the above table, the Diseased and Camouflaged Jadinko are uninterested in flowers. However, the Camouflaged are interested in Lergberries, while the Diseased feed on bananas, which the other species don't seem to care for. Perhaps this species has some adaptation which allows them access to bananas on the tall trees.

Let's look at the red flower competitors next: Shadow, Aquatic, and Draconic. Shadow's only preference are red flowers; this could mean that their primary source of food (as well as the other species') are the flowers. The Diseased variant mentioned previously probably lives in areas lacking any flowers or berry bushes, thus forcing them to feed on bananas. If the red flowers are their primary source of food, then there is some competition in that regard. However, notice that Aquatic prefers Kalferberries, while Draconic prefer Lergberries. The berries could be their secondary source of food. Finally, Aquatic also prefers Apples; fruit would be their third source of food.

Similar logic can be applied to the green flower competitors: Cannibal and Carrion. This is where the "habitat" comes into play. Since they both prefer green flowers, and the same berry, there would be direct competition if they lived in the same area. But the Cannibal's live in Tall Grass, while the Carrion live in the Boneyard. The Diseased variant also live in the Boneyard, but no conflict arises, since they feed on bananas.

Finally, the blue flower competitors: Igneous and Amphibious. They also share the same berry preference: Lergberry. However, Igneous have access to Oranges; once more due to this, there is no direct competition.

Let's summarize each species' food preferences:

Common: Blue Flowers*
Shadow: Red Flowers
Igneous: Oranges
Cannibal: Green Flowers / Kalferberries
Aquatic: Apples
Amphibious: Blue Flowers
Carrion: Green Flowers / Kalferberries
Diseased: Bananas
Camouflaged: Lergberries
Draconic: Red Flowers


It seems that if Cannibal / Carrion and Shadow / Draconic would compete against each other if they didn't live in different habitats. But they do; you can consider each "habitat" analogous to the different islands Darwin's finches inhabited.

*In regards to common Jadinkos, blue flowers would be the best source of food, as there is the least amount of competition for this kind.

Finally, I mentioned 3 God "Jadinkos". They change their preferences every week, so what the player used to attract them last week won't be the same the following one. To be able to change their niche and adapt to it so rapidly is truly deserving of giving them a "God" title.

Monday, March 28, 2011

立直

One of the things that intrigue me about the Japanese style of Mahjong is the Riichi system. If anything, it is a system which balances risk vs. reward. At the cost of 1000 points, you can declare Riichi, which basically gives you a win condition. Of course you can only do this if your hand is completely concealed, with the exception of a self Kan. Therefore, with Riichi, players will tend to be divided into two play styles, which I will shortly evaluate now.

1) The "Win Any Way Possible" players

Most beginners and those that are unfamiliar with Japanese Mahjong fall under this category. These are the players who don't care about points; only about winning, even with the worst hands imaginable. Sure it's fun to win, but half the fun of winning is the challenge. Playing Chicken or using the easiest win condition (Pon of a dragon, or seat/round wind) can get dull fast. Granted everyone starts in this category, but only those dedicated move on to the second category.

2) The "Win Elegantly" players

What do I mean by elegantly? I think it's just a word to encompass the players that go for complex hands, attempt to Riichi, pay attention to the Dora indicators, change their strategy based on the flow of the game, and in general, not just try to win, but to WIN.

Category 2 players will focus heavily on Riichi, since it changes the flow of the game completely. Let's review what Riichi does on a broad scale:

- Riichi player forgoes 1000 points
- They discard the tile that isn't part of a Tenpai wait
- They then discard any new tile they draw unless that tile grants a Tsumo

At first it may seem that declaring Riichi is a stupid thing to do. Not only do you LOSE points, but you also tell everyone you're in Tenpai, thereby changing the way they play (in the regard of what they discard, etc). In addition, you can't alter your hand, which in a sense makes it harder to win. Is that worth the "free" win condition? Most category 1 players would say no, while most category 2 players would say yes. What causes this distinction? That would be the mentality that each category player holds.

Since category 1 players are so obsessed with winning, they don't want to give their opponent any kind of "advantage" per se. Category 2 players know that even if the opponent knows they're in Tenpai, for the most part it won't alter their chances of winning.

But how is that so if the good player will change from being offensive (constructing their hand), to defensive (discarding safe tiles instead of focusing on their own hand)? Think about it. The defensive player has a much lower chance of winning, since they cater to you, the aggressive Riichi player. Even if you don't win, you're still in Tenpai, so you'll get most, if not all your points back.

One thing about Riichi I have neglected to mention until now, is that if you win, you get access to the Under Dora, which is basically a Dora indicator under the regular Dora indicator. If any Kans had been obtained during that game, then you get access to Under Dora up to the amount of regular Dora indicators. Basically, you double your Dora indicators. So even if the only win condition you have is Riichi, Dora can help boost your score.

Hopefully you (the reader) will now consider becoming a category 2 player. One last thing to keep in mind about Riichi is when to declare, and when not to. Most players will get very excited that they can declare Riichi (since it isn't something you can do every game obviously), and will automatically declare when they can. For the most part, this is a mistake. Two reasons for this:

1) No alteration of waits

Say you draw your next tile, and now you're in Tenpai, with an all concealed hand. Before deciding to declare Riichi, examine your waits. Your waits should always be in your favor. Consider things like:

- The pool, what has or hasn't been discarded
- Terminal waits
- Furiten

The first point is common sense; if the pool consists of 3 of the tile you are waiting for, then it is highly unlikely that you will get the last of that tile.

The second point is also common sense. If you have a 1 and 2, then you are stuck waiting on a 3. On the other hand, if you have a 2 and a 3, you can wait on either 1 or 4, which essentially doubles the chance of winning. Therefore, the best waits for Riichi are sequences with two ends, (such as the aforementioned) or two pairs of any tile. For the latter, this is a good wait, since most of the time there would be little correlation on your waits (You could be waiting on 1 Pin and North wind for example). It helps to prevent your opponents from predicting your wait.

The final point is something I've mentioned previously very extensively. Even if you have a 2 and 3 Pin, waiting on 1 and 4 Pin, if you had discarded 1 Pin at any point in the game, you cannot win if someone discards that tile. It doesn't stop you from declaring Riichi however; it merely lowers your chances of winning.

2) Duration of game

This is a no-brainer. It's best to declare Riichi as early as possible; that way there won't be many discards in your pool for your opponent to read safe tiles from. Declaring Riichi late game is a mistake, since not only do you only have a few rounds of discards to win off of, but your pool is massive, which makes it easy for your opponent to discard safe tiles.

I guess the point I'm trying to make is to use common sense. Riichi is a privilege that shouldn't be abused.

Saturday, March 26, 2011

カンタレラ


カンタレラ (Cantarella)

見つめ合う その視線 閉じた世界の中

mitsumeau sono shisen tojita sekai no naka

気づかない ふりをしても 酔いを悟られそう

kizukanai furi wo shite mo yoi wo satoraresou


焼け付くこの心 隠して近づいて

yaketsuku kono kokoro kakushite chikazuite

吐息感じれば 痺れるほど

toiki kanjireba shibireru hodo


ありふれた恋心に 今罠を仕掛けて

arifureta koigokoro ni ima wana wo shikakete

僅かな隙間にも 足跡残さないよ

wazukana sukima nimo ashiato nokosanai yo


見え透いた言葉だと 君は油断してる

miesuita kotoba dato kimi wa yudan shiteru

良く知った劇薬なら 飲み干せる気がした

yoku shitta gekiyaku nara nomihoseru kigashita


錆びつく鎖から 逃れるあても無い

sabitsuku kusari kara nogareru atemonai

響く秒針に 抗うほど

hibiku byoushin ni aragau hodo


たとえば深い茂みの中 滑り込ませて

tatoeba fukai shigemi no naka suberikomasete

繋いだ汗の香りに ただ侵されそう

tsunaida ase no kaori ni tada okasaresou


ありふれた恋心に 今罠を仕掛ける

arifureta koigokoro ni ima wana wo shikakeru

僅かな隙間 覗けば

wazukana sukima nozokeba


捕まえて

tsukamaete


たとえば深い茂みの中 滑り込ませて

tatoeba fukai shigemi no naka suberikomasete

繋いだ汗の香りに ただ侵
されてる

tsunaida ase no kaori ni tada okasareteru 

Short and sweet; another song I'd consider covering. Not to mention my pitch is a great match for a song this high, except maybe for the part after the violin solo where it's one octave lower; I'll work on that.

And of course, sexy covers:

【clear】カンタレラを歌ってみた【nero】

【蛇足】カンタレラ【歌ってみた】

【ヤマイ】 『カンタレラ』 を二人で飲み干してみた 【プリクマー】

『カンタレラ』 歌ってみた 【リツカ】


My favorite of course being clear x nero.

Friday, March 25, 2011

ボランティア 十日目

1:18 - Bad start is bad. Lunch was a slice of pizza, which I didn't finish due to time restraints. Lots o complaints; elaboration later
 
1:50 - So hungry
 
2:04 - Someone trying to learn English by reading the directory board. I admire their ambition, but I think it would be better not to start with medical terms with a Latin origin
 
2:09 - Some guy was singing "I Want it that Way" by the Backstreet Boys out loud. Funny stuff.
 
2:30 - Family dispute over; explain later
 
2:35 - Labbbbbbb!
 
2:44 - Why do the lights stay on at night in this building. What a random question, but any random question can be answered with Science!
 
3:00 - Wheelchair time! But there aren't any in this building so I went to the next closest to get one. When I got back I got tipped. I'm not allowed to take money, but I did to avoid the inevitable dispute that would follow if I didn't. So I took it and put it in the change purse for future wheelchair endeavors
 
3:24 - Most people who don't want help will politely say no, as they should. This one rude fellow replied "Do you think I'm ****ing stupid?" Of course after that I kept silent to keep my job. But I do think he is of lower intellect if he has to resort to profanity to emphasis a reply. Guy pride; my worst enemy
 
3:39 - Suddenly, an influx of lab questions
 
 
Today started out pretty rotten. I received various complaints from visitors, all of which were out of my control. It's not my fault that two other volunteers misguided you, and it's not my fault your lost agenda was at the information desk and not with security; these things I was not present for, and I cannot take any responsibility.
That's the thing about being a volunteer at a highly respected institution (In this case, the hospital). People expect you to know everything, and that is simply too much to expect from a volunteer.

An interesting aside, there was this rebellious kid, most likely in the lower numbers of grade school. Apparently the situation was that he stole something from the Shopper's Drug Mart, but since I was busy with the job I didn't pay attention to much of the details. Nothing too big, but a pleasant distraction.

"Why do the lights stay on at night in this building?" is probably the most interesting question I've received on the job. I proceeded to explain circuits, the properties of a light bulb, and how constant turning on/off of the switch can result in more power wasted over time. That's Physics for you.

So overall it was a pleasant day, but the pleasantries were ruined by a very rude man. It's my job to ask if you need any assistance, and a simple "No thanks" would suffice to reject that offer. Saying "Do you think I'm ****ing stupid?" only shows that you are, because your vernacular is too incompetent to articulate a more sophisticated response. If I were not on the job, or if I could say that without risk of losing the volunteer position, I would totally. Like I mentioned before, most people are very polite rejecting my offer for help, but there's still the rare anomaly of this sort.

Thursday, March 24, 2011

物理学もう一度: 式シートない

Really getting tired of no formula sheets. Oh well, last midterm anyways:


Wednesday, March 23, 2011

Physics Review Day 2

Circular Loop

A piece of wire is formed into a circular loop of radius 23 cm. The loop has a resistance of 141 Ω. A magnetic field of 0.9T is applied perpendicular to the plane of the loop and then increased at a constant rate by a factor of 2.2 in 17 s. Calculate the magnitude of the induced emf in the loop during that time.

We are informed that there is a change in magnetic field; this indicates flux, and we apply Faraday's Law:

|ε| = ΔΦ / ΔT where Φ = BAcosθ and cos0 = 1

We don't know B exactly, but we are given a constant factor of increase; therefore we can treat B as 1.

|ε| = (2.2B - B)[π(23.0 cm * 1 m / 100 m)2] / 17 s
|ε| = (1.2 T)[π(0.23 m)2] / 17 s
|ε| = 1.06×10-2

Calculate the current induced in the loop during that time.

Simple application of Ohm's Law:

I = ε / R
I = (1.06×10-2 V ) / 141 Ω
I = 7.49×10-5

Calculate the average induced emf when the magnetic field is constant at 1.98 T while the loop is pulled horizontally out of the magnetic field region in 6.5 s.


Back to Faraday's Law. This time, the area changes as opposed to the magnetic field, but the same concept applies:

|ε| = ΔΦ / ΔT where Φ = BAcosθ and cos90 = 1
|ε| = (1.98 T)[0 -  π(23.0 cm * 1 m / 100 m)2] / 6.5 s
|ε| = 5.06×10-2 V

Rotating Square Coil

What is the peak emf produced by a 74-turn square coil (of side l = 26.0 cm, as shown in the diagram below,) rotating on an axis with a frequency of 37.0 Hz in a uniform magnetic field of 0.695 T perpendicular to the coil's axis of rotation? 

Use the equation for a rotating coil (AKA an electric generator), considering the fact that peak emf is when the magnetic field is perpendicular to the coil:

ε = NABωsin(ωt) where ω = 2πf
ε = (74)(26.0 cm * 1 m / 100 m)2 (0.695 T) * (2π*37.0) sin90
ε = 8.08×102

Coiled Wire

You have a piece of thin wire that is 15.5m long, a constant uniform magnetic field of 0.155T, and a device that can rotate a coil at a fixed frequency of 87.5Hz. What is the radius of a circular coil made from this length of wire that will produce an AC e.m.f of maximum voltage 116V? (Neglect the amount of wire used in the connections.)

Once again, we use the rotating coil equation:

ε = NABωsin(ωt) where ω = 2πf

However, we don't know N, the number of turns. However, we do know the length of the wire L;
we can equate and find N:


L = 2πrN (Since the length is equal to the circumference times the number of turns)
N = L / 2πr


We can now plug in the second equation into the first, and solve:

ε = NABωsin(ωt) where ω = 2πf
ε = (L / 2πr)ABωsin(ωt)
116 V = (15.5 m / 2πr)(πr2)(0.155T)(2π*87.5 Hz)
r = 116 V / (15.5 m * π * 0.155 T * 87.5 Hz)
r =  1.76×10-1

Wavetrains

If light is emitted from an atom in little wavetrains, each lasting up to 2.90 × 10-8 s, how long, at most, is such a disturbance in space? 

Wavelength is equal to the speed of light multiplied by the time:

L = ct = (3.0E+08 ms-1)(2.90E-8 s)
L = 8.70 m 

If we approximate the wavelength as 510 nm, roughly how many waves long is the train? 


The number of waves is simply the length divided by the wavelength:

# Waves = L / λ = (8.70 m) / (510 nm * 1.0E-9 m / 1 nm)
# Waves = 1.71×10

Laser Pulses

A laser that emits pulses of UV lasting 2.25 ns has a beam diameter of 2.25 mm. If each burst contains an energy of 2.70 J, what is the length in space of each pulse?

The length in space is simply the speed multiplied by the time (Kinematics):

l = ct = (3.0E+08) * (2.25 ns * 1.0E-9 s / 1 ns)
l = 6.75×10-1 m

What is the average energy per unit volume (the energy density) in one of these pulses?  
 

A laser is a cylindrical beam, so the volume of that beam is the length in space:

V = πr2

V = π[(2.25 mm * 1.0 m / 1000 mm) / 2]2 * 6.75×10-1 m
V = 4.77E-3 m3

We can now find energy density by dividing the energy by the volume:


= 2.70 J / 4.77E-3 m3
= 1.01×106 J/m^3 

Irradiance of a Candle


The irradiance 1 m from a candle flame is just about 4.65 × 10-3 W/m2. How much energy will arrive in 1.25 s on a disk having a 3.95- cm2 area held as close to perpendicular as possible 1 m from the flame? 

Energy is related to irradiance by the following formula:

E = IAt = (4.65 × 10-3 W/m2)(3.95 cm2 * 1.0 m2 / 1.0E+4 cm2)(1.25 s)
E = 2.30×10-6

Tuesday, March 22, 2011

Physics Review Day 1

Magnetic Force on an Electron

At SFU the magnetic field due to the earth is at 16.2° to the vertical and has a magnitude of 6.34E-5T. An electron moves straight down at 2.98E+5ms−1. Find the ratio of the magnitude of the magnetic force on the electron to its weight, mg.

Simple question; just plug in numbers

|Fm| / mg = qvBsinθ / mg

q = -1.6E-19 C
m = 9.1E-31 kg
g = 9.81 ms−2

= | (-1.6E-19 C)(2.98E+5ms−1)(6.34E-5T)sin(16.2) | / (9.1E-31 kg)(9.81 m·s−2)
= 9.46×1010 (No units)

Charged Cork Ball

A cork ball carrying charge q has a mass of 2.10 g and is set in motion perpendicular to a uniform magnetic field of 0.90 T. What is the magnitude of q if its direction of motion changes by 5.0° in 1.0 s? 


Since the ball is set in motion perpendicular to a uniform magnetic field, it will undergo centripetal motion. In other words, centripetal motion is achieved when the centripetal force equals the magnetic force.

Fc = Fm
mv2 / r = qvBsinθ
q = mv / rBsinθ

To find v, we use the fact that the ball's direction of motion changes by 5.0° in 1.0 s.

ω = v/r where ω = Δθ / Δt = (5*π/180) / 1.0 s (Must convert degrees to radians for angular motion)
ω =  0.0873 s−1

Finally:
q = mv / rBsinθ = (2.10 g * 1 kg / 1000 g)(0.0873 s−1) / (0.90 T)
q = 2.04×10-4 C

Proton Orbit

A proton is sailing through the outer region of the Sun at a speed of 0.275 c. It traverses a locally uniform magnetic field of 0.345 T at an angle of 29.8°. What is the radius of its helical orbit? (Hint: v|| and v⊥ can be considered separately.)

Only v⊥ is influenced by B, so we can completely ignore v||. As such, it becomes a simple plug in values question:


The helical movement is defined the same as circular motion for v⊥:

mv2 / r = qvBsinθ
r = mv / qBsinθ

q =  1.6E-19 C
m = 1.67E-27 kg
c = 3.0E+8 m·s−1

We have enough information to solve for r now:


r = mv / qBsinθ = (1.67E-27 kg)(0.275*3.0E+8 ms−1) / (1.6E-19 C)(0.345 T)sin(29.8)
r = 1.24 m 

Current in Parallel Wires

An infinitely long wire lies along the z-axis and carries a current of I=2.95 A in the positive z-direction. A second infinitely long wire is parallel to the z-axis and lies along the plane x=+12.0cm. Find the current in the second wire if the net magnetic field at x=+7.50cm is zero.

Long wire indicates this formula:

B = µ0I / 2πr
µ0 = 4π×10−7 N·A−2

Find B of the first wire, using the distance at which B of the second wire is zero:

B = µ0I / 2πr
B = (4π×10−7 N·A−2)(2.95 A) / (2π)(7.50 cm * 1 m / 100 cm) = 7.87E-6 T

Now we can use this B to find I in the second wire (Using the premise that B1 = B2) by using the distance d - r where d is the separation of the two wires and r is the distance at which B2 = 0

I = B*2πr / µ0
I = (7.87E-6 T)(2π*(12.0 cm - 7.50 cm) * 1 m / 100 cm)) / (4π×10−7 N·A−2)
I = 1.77 A

Parallel Wires
The diagram above depicts two long horizontal straight parallel wires that are a distance d=22.30cm apart and each carries a current of 3.90A in the same direction, out of the page. What is the magnitude of the magnetic field at a point that is a perpendicular distance r=27.04cm from both wires?

A simplified vector question. Since both wires carry the same amount of current in the same direction, by vector addition, the total B will be 2Bcosθ. The vertical component of each vector cancels, and the horizontal component adds (Since one B points diagonally northwest while the other points diagonally southwest).

The angle θ is found by trigonometry:

arcsin((22.3/2) / 27.04) = 24.35

B = µ0I / 2πr
B = (4π×10−7 N·A−2)(3.90 A) / (2π)(27.04 cm * 1 m / 100 cm) = 2.88E-6 T

By vector addition:

Btotal = 2Bcosθ = 2(2.88E-6 T)cos(24.35)
Btotal = 5.26×10-6

What is the direction of the resultant magnetic field at point P? Express its direction, θ, in degrees as follows: a vector pointing left corresponds to 0 degrees, a vector pointing up corresponds to 90 degrees, a vector pointing right corresponds to 180 degrees, and so on.


In the first part, it was determined that the vertical components of the vectors canceled; that means the resultant magnetic field travels parallel to the normal; hence the answer is 0 degrees.


Hydrogen Atom


A rather simplistic model of the hydrogen atom has a single electron revolving around a nuclear proton with an orbital radius of 5.20E-9 m at a speed of 4.00E+6 m/s. Determine the magnetic field at the proton due to the electron.

The electron orbits the proton; this is analogous to the magnetic field at the center of a loop:

B = µ0I / 2r

To find I, recall that:

I = q/T ; current is defined as charge over time. q is proton charge: 1.6E-19 C

To find time T, which is really the period due to circular motion:

T = 2π / ω and ω = v / r so
T = 2π / (v / r) = 2π / (4.00E+6 ms−1 / 5.20E-9 m)
T = 8.17E-15 s

Now find I:

I = q/T = (1.6E-19 C)(8.17E-15 s) = 1.31E-33 C

Finally, find B:

B = µ0I / 2r
B = (4π×10−7 N·A−2)(1.31E-33 C) / 2(5.20E-9 m)
B = 2.37×10-3

Small Solenoid

A small diameter, 11- cm long, solenoid has 283 turns and is connected in series with a resistor of 137 Ω. Calculate the magnitude of the magnetic field in the middle of the solenoid when a voltage of 55 V  is applied to the circuit.

Simply use the solenoid equation:

B = µ0*N*I / L and I = V / R
B = (4π×10−7 N·A−2)(283)(55 V / 137 Ω) / (11 cm * 1 m / 100 cm)
B = 1.30E-3 T



Monday, March 21, 2011

麻雀: タイルを数える

In the movie 21, the main character, Ben, participates in "counting cards" in the game of blackjack. This is a simple system which allowed him and his teammates to know which dealers were favorable; in other words, a higher (although slim) probability of winning.

I won't go over the details of how to count cards, but basically they used a -1, 0, 1 system. 2, 3, 4, 5, 6 were given the number -1; 7, 8, 9 were given 0, and 10, Jack, Queen, King, Ace were given +1. The premise of the system is that every time a card was revealed (it doesn't have to be your own), you would add or subtract accordingly. By doing so, we get a "value"; this value tells us whether or not the current deck is favorable to bet on.

Basically, a high value meant it was not favorable (since to get a high value, you exhaust the 10s and Aces, which are the easiest way to win), and a low value meant it was favorable (using the opposite reasoning, by exhausting the low numbers, there is a higher probability of getting those 10s and Aces).

An example to cement the point before I move on:


We add the appropriate numbers as they appear from left to right:

1-1+0+0-1-1-1-1+1+1 = -2

We end up with a final "value" of -2. This tells us that more low numbers have been used, and therefore we have a higher probability of getting 10s and Aces.

Before I go to the main point of this post, I'll mention that Casinos use multiple decks, I think 6 is the number, when playing Blackjack. However, they do not shuffle the cards back in every game; this is what makes the counting system possible.

In this post, I propose the usage of card counting while playing Mahjong. Although the nature is different, the motive is the same; to predict probability during a game.

The simplest way (And perhaps the only practical way) to do so is if you are looking for one particular suit, so you are trying to form either a half flush or a full flush. For example, I am going for a half flush of Pin; we will denote the suit of interest with a value of +1.

For the other suits (AKA the ones we are not interested in), we denote one of them +100, and -100. For our example, we will denote Man +100, and Sou -100.

Finally, any honour tiles will be denoted 0, since these tiles are essentially "floaters", tiles that take up space that most of the time no one wants.

It may seem preposterous to "count" tiles, but I propose that it is in fact practical. Once again, this is best shown with example.


Due to the nature of Mahjong, and how we discard tiles (As opposed to Blackjack, where we can only add cards, not get rid of them), it would be redundant to count tiles in the hand for two reasons:

1.  It will result in double counting of your own hand (You count once in the hand, and again when you discard; we are only interested in the discarded ones)
2.  You can't see your opponent's hand. If they decide to steal a tile from the discard, then we in fact do include those in the count (only the new tiles revealed by the player declaring Pon, Chi, Kan though).

As such, we will only count discarded tiles, and those revealed when taking from the pool.


I start by discarding 3 Man, and the computer players follow by discarding honour tiles. So the total count so far is +101 (The +1 comes from the Dora indicator, which we also include when counting, as it is "in the pool" per se). As an aside, I pick Man to be +100 because it is easily memorable (In the sense that Man tiles are essentially large numbers, and you obtain large numbers by adding).

We continue in this fashion:


We start with my second discard, 1 Pin, then South player's (Player on the right) second discard.

-1000+0+0+0+0 = +1

Not shown in the picture is that I declared Pon on West player's South tile, hence the triple bolded +0. I now begin again, starting with my third discard, South player's Third discard, then West player's second discard, and North player's second discard. Then we count accordingly:

-100+0-100+0 = -201
+100+1+0+0 = -102
-100+1+0-100 = -303
+100+1-100+1 = -305
+0+1-100-100 = -506
+0-100+100+0 = -506

So the final count (Before I declare Ron) is -506. I know what you're thinking. "-201 + 100 + 1 isn't -102, it's -101". This is true, but it saves work on unnecessary math. The point is to keep track, not to add. So we essentially have two values we keep track: the +100 -100 series (The uninterested tiles) and the +1 series (The tiles of interest). In that sense, only the first digit (And the second digit should the count go to four digit numbers) are subjected to the negative sign.

But what does this number -505 tell us. It lets us infer a few things.

1. As of this point in the game, more Sou tiles have been dealt than Man tiles (This is the only conclusion we can ascertain).
2. There are, at most, 30 Pin tiles left in the game (At most is the best case scenario, as the final 14 tiles are never revealed unless someone gets a Kan. Even so, that leaves 5 Reverse Dora tiles that are not revealed during the game.)
3. The proportion of Sou tiles to the rest of the tiles is less favorable (This is inferred by comparing the first number, in this case 5, with our last number, which is 6. Since the last number is greater than the first number, we infer that it is less probable of drawing a Sou than anything else). This last inference is very sketchy, as the suit of interest only encompasses 25% of all tiles, while the other 75% is encompassed by the other suits and the honour tiles. If there was at least 3 deviations away from that value (So -18 or +18), then it would be a stronger inference that it would be more probable to draw the suit of interest.

It's not hard to keep track of two numbers in your head; with practice it'll help you up your game.

PS: That hand was a half-flush with one triplet honour/wind. The way the hand is constructed, it sums up to 30 fu, 3 fan, which amasses 5800 points, all to be paid by North player (The one who dealt the winning tile). I'll do a post on the point system eventually...

Sunday, March 20, 2011

一時間タピオカティー

So as a break from homework, I went out for some bubble tea.

My plan was to hop on the bus, buy a drink, and bus back; this should have taken 30 minutes at most, depending on the bus schedule.

I walk towards the bus stop, and see a bus go past me. Obviously I ran; opportunity cost would be lost otherwise. I made it, barely, and after about 10 minutes, arrived at the nearest bubble tea place.

It wasn't very busy, at least from what I could tell, so I take a while deciding what to get, and finally order a Green Tea one.

So I waited.

And waited.

And got my drink...one hour later.

Normally I don't mind waiting, but an hour for a bubble tea is ludicrous! Granted it got a lot busier after I ordered, but emphasis on the after part. I could have just bussed a little further to a Starbucks and get a Green Tea Frap; same flavor while saving 50 minutes.

So here's a list of 50 things I could have done in that hour, instead of waiting for bubble tea, in no particular order of preference of course:
  1. Write a decent blog post (I don't consider lists decent)
  2. Finish Math homework
  3. Finish Physics homework
  4. Finish preparing for Chemistry lab (AKA homework)
  5. Work on my final project for English
  6. Read the readings for Biology lecture and lab (Not like I do that anyways, but still)
  7. Start Statistics homework
  8. Sleep
  9. Beat one of Touhou 6, 7, 8, 10, 11, or 12 as well as the Extra stage
  10. Mahjong for an hour
  11. Practice piano
  12. Play some children's card games (Yu-Gi-Oh)
  13. Watch 3 episodes of an Anime
  14. Play some RuneScape
  15. Eat a meal
  16. Plan what courses to take next semester (If I do decide to take any)
  17. Browse forums mindlessly
  18. Take a shower or bath
  19. Go to the next closest bubble tea place, buy a drink, and go back home (Which would still be faster than waiting for an hour)
  20. Write another chapter of Fanfiction
  21. Clean my room (Yeah right)
  22. Listen to え?あぁ、そう。18 times
  23. Finish watching Weiss Schwarz R (Each episode is only 2:30, and 16 episodes)
  24. Buy groceries at a nearby convenience store
  25. Watch TV (Rarely do that these days)
  26. Play on the DS/Wii (Rarely do that too)
  27. Create a random flow-chart
  28. Read a book for leisure (Not much of a reader)
  29. Read a web comic I'm not currently following
  30. Read manga (I'm more of an Anime watcher than a manga reader though)
  31. Watch random YouTube
  32. /b/
  33. Exercise? (Run around in that time, I dunno)
  34. Browse Danbooru
  35. Hunt for awesome avatars
  36. Memorize the lyrics to a song
  37. Learn a new hobby
  38. Learn how to play Weiss Schwarz
  39. Sew up imperfections in my Cosplay
  40. Browse Craigslist
  41. Window shopping the nearest mall (Probably Oakridge)
  42. Rethink what I do with my spare time
  43. Get a haircut (Again, not happening anytime soon)
  44. Origami
  45. Start on a Kirie
  46. Learn Java (or some other coding language)
  47. Read the news (Being this low on the list shows how little I think about current events)
  48. Refresh ZUN's blog in a futile attempt to get news about Touhou 13
  49. Fun only a man can have (The connotations indeed)
  50. Create this awful list.

Saturday, March 19, 2011

え?あぁ、そう。


え?あぁ、そう。(Huh, Oh, that's right)


建前だけの感情論で全てを量ろうなんて
tatemae dake no kanjou ron de subete o hakarou nante
そんなのはお門違い、笑わせないでよね
sonna nowa okado chigai warawase nai de yone


だけどたまには楽しいことも必要だと思うの
dakedo tama niwa tanoshii koto mo hitsuyou dato omou no
気が済むまで私も満足したいわ
ki ga sumu made watashi mo manzoku shitai wa


目の前から消えていった心を刺す嘘みたいに
me no mae kara kie te itta kokoro o sasu uso mitai ni
ぐるぐるって混ざる様なこの感じがたまらない
guru guru tte mazaru youna kono kanji ga tamara nai


ねぇ、ぶっ飛んじゃうのが良いなら
nee button jau noga ii nara
私をもっと本気にさせて
watashi o motto honki ni sase te
逃げるなんて許さないわ
nigeru nante yurusa nai wa
やっぱりそんな程度なのかしら
yappari son'na teido nano kashira


甘いのもいいと思うけれど苦いのも嫌いじゃない
amai nomo ii to omou keredo nigai nomo kirai ja nai
そんな私の事を我儘だと言うの?
sonna watashi no koto o wagamama da to iu no?


馬鹿だとかアホらしいとか言いたいだけ言えばいいわ
baka da toka aho rashī toka ī tai dake ieba ii wa
他人の価値観なんて私は知らないの
hito no kachi kan nante watashi wa shira nai no


掌から落ちていった紫色の花みたいに
tenohira kara ochi te itta murasaki iro no hana mitai ni
くるくるって踊る様なこの感じがたまらない
kuru kuru tte odoru youna kono kanji ga tamara nai


さぁ、どうなっちゃうのか見せてよ
saa dou nacchau noka mise te yo
本能?理性?どちらが勝つの
honnou? risei? dochira ga katsu no
超絶倫【自主規制】で魅せてよ
chou zetsurin jishukisei *(censored)* de mise te yo
本当はここを欲しがるくせに
hontou wa koko o hoshi garu kuse ni


嬉しいとか気持ち良いとか
ureshi i toka kimochi ii toka
所詮それは自己満足
shosen sore wa jiko manzoku
そういうのって投げ捨てちゃって
sou iuno tte nage sute chatte
いいんじゃない?って思わせて
iin ja nai? tte omo wase te


もうぶっ飛んじゃったら良いでしょ
mou button ja ttara ii desho
一体どこに不満があるの?
ittai doko ni fuman ga aru no?
いっそこうなったら逃がさない
isso kou nattara nigasa nai
だからね、ほらね、覚悟して
dakara ne hora ne kakugo shite


さぁ、どうなっちゃってもいいから
saa dou naccha ttemo ii kara
その目で最後まで見届けて
sono me de saigo made mi todoke te
どこまでイッても止まらない
doko made ittemo tomara na
だけどね、でもね、そろそろ限界
dakedo ne demo ne soro soro genkai

あぁもうダメ…
ah mou dame...


Now for the sexy covers (You decide which one is best; I pick  むっち):

【むっち】 え?あぁ、そう。歌ってみた 


【蛇足】え?あぁ、そう。【歌ってみた】

『え?あぁ、そう。』 歌ってみた 【ヤマイ】

And now for all three together:


I need to get over my obsession with this song...eventually, before I start singing a cover.

Friday, March 18, 2011

ボランティア 九日目

12:55 - I'm early AND I've eaten lunch; what a change!
 
1:06 - The first thing I see when I enter is a lack of wheelchairs. Time to steal some.
 
1:30 - In the end I only stole 2. More on this later.
 
2:02 - I made an epic fail today. Will confess later
 
2:25 - Obligatory lab question
 
2:48 - Note to self: Find out where the Transplant Clinic Pharmacy is
 
3:14 - Someone spilled some coffee; leading cause of injury as an outpatient is falls. Of course I clean it up with great haste.
 
3:38 - It has become quiet now. Actually a busy day today; makes things less boring in the long run.
 
So the hospital has new volunteer vests; dark blue in color as opposed to the teal ones before. The way the new system works is that instead of everyone having their own vest, there is a rack with many vests and differing sizes. We take our name tag (Arranged alphabetically in drawers) and put it on a vest. Then at the end of the shift, we put the name tag back and throw the vest in the laundry basket. This way, no one can "steal" someone else's vest, and hospital hygiene is maintained! This means I can spill as much sauce as I want (Not like I would do that on purpose though).

Due to the repeatability of my work, frequent updates are no longer viable. So I've resolved to only update around every half hour, and when something abnormal happens. Then when I come home, type something about it.

The first thing was the wheelchair situation. There were no wheelchairs when I entered the building; this is obviously a problem, so I went around looking for some. I bumped into my volunteer coordinator who told me to go to Emergency to get some. The trek from my current location to Emergency took about 10 minutes, and the trip back another 15; the latter took more time as lugging around wheelchairs is no easy business. The most disappointing thing was that no one used them today. Hard work for nothing; that is the life of a volunteer.

The second thing is probably the first time I majorly messed up. A family asked me where the Children's Hospital was. From my basic knowledge, I redirected them to B.C. Children's Hospital, which although isn't far from this hospital, is still quite a drive. I later found out, after much digging through my folder of information, that there is something called the "Child Care Center", which was probably what the family was really looking for. This is why you have to be specific with names; a misnomer like that can easily result in faulty directions. I feel really bad about it, but there isn't much I can do but learn from the mistake and make sure it doesn't happen again. It's all part of the volunteer process.

Thursday, March 17, 2011

ストーム・オブ・ラグナロクボックス:分析

Refer to this post for the table of data

First, some numbers:

Number of packs opened: 36 (1 box and half of another box)
 
Total number of Rares: 36 (Because each pack comes with 1 rare)
Total number of Super Rares: 5
Total number of Ultra Rares: 2
Total number of Ultimate Rares: 2
Total number of Secret Rares: 1
Total number of Ghost Rares: 0
Total number of Commons: (5+2+2+1) * 7 + (36 - (5+2+2+1)) * 8 = 278
Total number of Cards: 36 * 9 = 324

We can only calculate the number of commons after we find out how many of higher rarities there are. Since each pack is at worst a rare, those packs will have 8 commons and 1 rare. Packs with a card higher than a rare will also come with a rare; hence the 7 commons.

Most frequent Common: Token Stampede (10)
Least frequent Common: Xing Zhen Hu Replica (2)
Most frequent Rare: Guldfaxe of the Nordic Beasts & Legendary Six Samurai - Kageki (3)
Least frequent Rare: All rares appeared at least once; so no least frequent.

Let's construct a simple pmf (probability mass function) of our sample space using four decimal places. This is basically a table which lists the probability of getting such a rare in our sample space. Note that since our sample space is small, we cannot draw conclusive evidence, but we can still make inferences.


Doing some quick math, you can confirm that this is indeed a proper pmf, as all the p(x) add up to 1.

I'd like to note that because of our small sample space, I didn't pull a ghost rare (As an aside, my friend who opened the other half of the box did pull the Ghost Odin; if I were to consider his pulls, the data set would be influenced greatly. But I will not for the sake of simplicity).

Using this sample space, we can infer some statistics:

- 72% of all packs you open will only contain a rare (Not a promising number, I know, but that's how they make money)
- No rares are short-print (Seeing as I got at least one of each rare)
- Certain cards are short-print (A hypothesis, albeit one I cannot perform hypothesis testing on)
- The distribution of rarity is correct (In the sense that you'll get more Supers than Ultras, etc). We can infer that if you opened enough packs (Enough is subjective, but we're talking 100+ for consistency purposes)
- Ultra, Ultimate, and Ghost Rare share the same probability distribution (Once again, due to the nature of this small sample space, it is inconclusive, but it is again an inference).

For our pmf, we had to introduce the clause "only" for the rare rarity. Since you always get a rare, then there would be a 100% chance of getting a rare, which would not follow the rules of a pmf.

If we assume that no rares are short-print, then there is a 5% (1/20, because there are 20 rares in this set) of getting a particular rare you want. Since you always get a rare every pack, there is no conditional probability. If we were, for some reason, interested in the probability of getting a particular rare in a pack that only contained a rare, that probability would instead be 3.61%.

Once again, if we assume that no super rares are short-print, we find that our probability of getting a particular super rare is ever so slightly less than 1% (0.992%). Since this is an Intersection (Getting a Super Rare AND getting a certain Super Rare), we find this by multiplying the probability of obtaining a super rare (0.1389) with the probability of getting a particular super rare (1/14 = 0.0714). This is assuming there is no short-print factor; if so, then pulling a Kizan as I did would be even more rare (And the fact that my friend pulled one as well is a ridiculous probability; then again, we can assume independence).

Going to the Ultra/Ultimate/Ghost trio is probably the most interesting of the data set (I'll explain why later). Let's first calculate the probability of getting any one of the aforementioned, which is 11.12% (Since this is an Union (Ultra OR Ultimate) condition, we add all probabilities). We expect that this probability is less than that of obtaining a super; which we find to be true.

Now here is the interesting part. Suppose we wanted to calculate the probability of pulling the Ultimate Rare "Legendary Six Samurai - Enishi". If we assume that there is an equal chance of obtaining Ultra or Ultimate, then our probability is therefore 0.556% (Another Intersection; multiply the probability of an Ultra/Ultimate with the probability of getting Enishi).

Although this pmf doesn't have any probability for Ghost Rare, we can infer that it would share the total probability of getting the trio (So the Ghost Rare probability becomes 0.1112 / 3 = 0.0371). This is a special case, since Ghost Rare is exclusive to one card per set. Let's calculate that probability:

P(Ultra/Ultimate/Ghost ∪ Odin ∪Ghost) = (0.1112) * (1/10) * (1/3)= 0.00317 or 0.371%

This probability would also apply to the other 2 rarities of Odin.

So there's a 0.371% of getting an Odin in a pack. Why is this interesting? Once we examine the Secret Rare set, it will become clear.

Finally, we do the same thing for Secret Rare (Probability of getting a Secret Rare and getting a particular one), and we get 0.003475 or 0.3475%

What does this data tell us? It infers that there is a lower probability of getting ANY particular Secret Rare card than it is to get a Ghost Rare Odin. I repeat one last time that this is only an inference, and we cannot conclude this as a fact.

Eventually (After exams most likely), I might continue with a post relating the probability of making money by opening packs. This all has to do with Expected Value (More commonly known as the mean). We'll see how much I'll hate Statistics after the semester.

Wednesday, March 16, 2011

トップ十: 日本語の歌で単語

Top # Lists; something all bloggers resort to eventually. Might as well be sooner rather than later for me.

This is top 10 list (in no particular order) of the most frequent words in Japanese songs. Granted this list could apply to any language, at least now when you listen to an anime opening or some Vocaloid song, you'll be able to identify such words. I list words, and avoid prepositions, possessives, and indication of person (I, me, him, her, etc).

1) Love: 愛, 好き, 恋, 想い/ 思い(Ai, Suki, Koi, Omoi)

This may not be in order but it's obviously what comes to mind first. Who didn't see this coming? The Japanese sure have a lot of ways of saying love (Although Suki is usually associated more with like than love and Omoi usually means feelings, they all mean the same thing in the end.

2) God: 神様 (Kami-sama)

Usually just 神 (Kami) without the (sama). Japan is more lax about the usage of "God", whereas most western songs only indicate God if there are allusions to religion (Christianity, etc).

3) World: 世界 (Sekai)

Lots of mention about the world, usually comes with the next one too.

4) Everything: すべて(Subete)

They sure like to put emphasis on everything; like it isn't already implied.

5) Light: (Hikari)

Singing about light is usually dominant over darkness, though it's common to juxtapose them together.

6) Wind: (Kaze)

The most talked about "element"; probably because of all the easy similes. Also note the name of this blog (Which is of course named after the song of the same name).

7) Always: 何時も (Itsumo)

Usually paired with #1, but then again, most love songs are like that, regardless of language.

8) Dream: (Yume)

Because reality sucks.

9) Time: 時, 時間 (Toki, Jikan)

Glad this isn't in order; this would have been way up there.

10) Katakana: 片仮名

Not the actual word Katakana itself; this just encompasses any usage of foreign words (Because Engrish is awesome).

Tuesday, March 15, 2011

Power of the Sun

Part 1:

Given:

Flux: 137 W
Area: 0.1 m^2 (Area of solar panel which captures the sun's rays)
d = 1.5 x 10^11 m (Distance from the surface of the sun to the solar panel)

Find the total output power of the sun.

The general formula for power in terms of flux is:

P = SA * Φm / A

In words, the power equals the surface area times the magnetic flux density.

We have enough information to find those unknowns:

Φm / A = 137 W / 0.1 m^2 = 1370 W / m^2


SA: Since the sun is a sphere, we use the surface area formula of a sphere

SA = 4πd^2 = 4π(1.5 x 10^11 m)^2 = 1.88 x 10^23 m^2


Finally:

P = SA * Φm / A = 1370 W / m^2 * 1.88 x 10^23 m^2 = 3.9 x 10^26 W


Part 2:


Given:


λ = 500 nm

Find the number of protons per second.

Energy of a photon is defined as:

E = hf = h(c/λ)
 
Where E is the Power found in part 1 and h is Planck's Constant (6.626 x 10^-34)

Recall that frequency and wavelength are related by the speed of light: c = λf

That's the energy of 1 photon; however we are interested in the number of photons per second. Therefore we add a constant n in our equation and solve appropriately:

E = nh(c/λ)
n = (E*λ)/(h*c) = (3.9 x 10^26 W * 500 x 10^-9 m) / (6.626 x 10^-34 * 3.0 x 10^8 m/s)
n =  9.81 x 10^44

Sunday, March 13, 2011

週末のボーナスXP

I wouldn't normally blog about RuneScape, but I'll make an exception this time.

This weekend was Bonus Experience Weekend, which basically means that any member that plays will get extra experience for 10 hours. Since I was occupied for the majority of the weekend, I couldn't fully take advantage of it. But I still got a few levels, which means I'm ever slightly closer to maxing my stats (With 99 Dungeoneering of course, and not the ridiculous 120 level).