Archive for category Day-to-Day Thoughts

How Click Streams are like DNA

How Click Streams are like DNA

Introduction:

When doing web analytics, its easy to get overwhelmed with data. Using the proper data structures to store and analyze data is key to keeping things manageable. In this short paper, I present a new idea of a data structure to model user click streams as a series of ‘gene-like’ events, which lends itself nicely to analyzing these user click streams. A click stream refers to all of the clicks that a user makes on the website for a given web-browsing session. An example is a user opening an e-commerce website, navigating through a few pages, and ultimately exiting the website. Looking at clickstreams as an ordered series of small events allows us to capture user experiences over time as opposed to the normal approach of using aggregate numbers at specified time points. Similarly, it allows us to do operations that we are used to, such as ‘string matching’ where we simply look for similar sequences of events to calculate similarity between user experiences, which would otherwise be much more troublesome.

Assumptions:

While not necessarily proven across websites, my leading theory is that a user’s experience on a given website dictates his percentage to pay money. For instance, if I am on an e-commerce site and I see the most popular selling shirt, I may be more likely to buy that shirt than if I see the least popular shirt. In this, my probability to pay is dictated by the things I see on the website, and not necessarily by my pre-existing condition (although that may play a factor as well).

Body:

Often, there is too much data to capture for every user. For instance, a users mouse may move across thousands of pixels in a given session, and a user may click hundreds of different times, and each of these has a time characteristic associated with it.

So let’s start by making the model simple, and we’ll make a few iterations to make it better.

Lets say we took every URL on our website, and assigned it a number, and lets call this number the URL_ID. For a fictional site, we could make a table of all the urls something like this:

URL_ID URL
0 mypage.com
1 mypage.com/store
2 mypage.com/store/girls
3 mypage.com/store/guys
4 mypage.com/sweaters/guys
5 mypage.com/sweaters/girls
6 mypage.com/shirts/guys
7 mypage.com/shirts/girls
…. etc

Now, for each of these urls, there are many events that a user can take (watch a movie, select text, press buttons, submit forms, etc), but for simplicity, lets say that a user is limited to clicking links. So, we would make another table that assigned every link on our website a specific number as well, lets call this number LINK_ID. We could then create a table like this:

LINK_ID URL_ID
0 0 (mypage.com header link)
1 0 (mypage.com footer link)
2 0 (mypage.com main link for guys sweaters)
3 0 (mypage.com main link for girls sweaters)
4 1 etc…
5 1
6 1
etc

In the table above, we show that a given URL has many links a user can click on.

Now, let’s model a users click stream using our fancy new click event ids. So lets take the scenario where a user comes in and navigates through these pages in this order:

(User types url into address bar and presses enter)
mypage.com

mypage.com/store/girls

mypage.com/sweaters/guys

mypage.com/shirts/girls
(User exits)

Now, we can translate this users clickstream into a series of integers. We do this simply by substituting in a LINK_ID for each link that a user clicked on.

So we started with:

mypage.com

mypage.com/store/girls

mypage.com/sweaters/guys

mypage.com/shirts/girls

and each of these click events can be translated into an integer just by looking up the proper URL_ID and LINK_ID in the table that we made previously for our website.

mypage.com (URL_ID = 0)
(LINK_ID = 1)
mypage.com/store/girls (URL_ID = 2)
(LINK_ID = 4)
mypage.com/sweaters/guys (URL_ID = 4)
(LINK_ID=5)
mypage.com/shirts/girls (URL_ID=7)

In this case, if we just take the URL_IDs and LINK_IDs we have something that looks like this:

0
1
2
4
5
7

Lets just write those as an array of numbers, namely:

[0,1,2,4,5,7]

So in this case, we have condensed the users clickstream into a series of numbers, cool! This captures the order of clicks and the order of urls that a user experienced on our site. Now lets say we had another user, let’s call him user2, that had a click stream for one session like:

[0,2,4,5,7]

Do you see any advantages to representing user clickstreams this way? Many things become apparent when we look at these two streams, here are a few:

- Both users sessions ended on the 7 event

-Maybe this is the main drop-off of our website?
- Both users entered on the home page

- Does our entrance page affect the experience?
- Both the users visited pages 0,2,4,5,7

- Are pages 0,2,4,5,7 the user flow that optimizes revenue for my business?

These are just a few questions that could become easily apparent by analyzing click streams in this manner.

If we wanted to compare the similarity of two user experiences:

user1 = [0,5,4,3,2]
user2 = [0,5,2,5,1]

We could simply use many well-known string matching algorithms to compare how similar the experiences were (Levenshtein edit distance, Sellers edit distance, the Hamming distance, the longest common subsequence length, the longest common substring length, and the pair distance metric)! Each algorithm would give us different stats.

Imagine we had one event that we prized, such as users buying an item at our store, lets say that event was 9, and we had two user click sessions:

user1 [0,2,5,6,7,2,3,2,3,2,5,4,9]
user2 [0,6,3,2,3,2,5,9]

In this case, we see two unique user experiences on our site that led them to buy an item from our store. One valid way to look at the data may be to find the longest common subsequence, and correlate that with a buying event, namely:

3,2,3,2,5 (longest common subsequence)

If this subsequence was highly correlated with users reaching ‘9’ i.e. purchasing a product, we could then make new users to our site have a similar experience and hopefully convert more poeple to buy at our store, increasing our buyers conversion and getting more people to buy! This leads to the title of the paper, in that we could call this longest common subsequence a ‘gene’ encoding for paying users.

We could change events for users, based on previous click data.

Now, much of this is being done and has been done already many times. The novel part of this idea is to look at events as a series of ordered integers, to easily pick out certain genes and match users to each other through their clickstreams.

So now we can make the model a little more sophisticated. Let’s add many sessions, so each user session could be a string like we showed:

[user first session] [user second session] [user third session]

could look something like

[0,2,5,3,4,5,4] [2,3,4,5,2,3] [2,3,4,2,3]

In this case, a user may visit the site first on the weekend, then not log in for many months, then log into the site on a wednesday, then many months later log into the site again on a tuesday. Inotherwords, the timing of a users actions would be a critical set of data to add. Let’s do that. We use the acronym SBV (seconds between visit) to represent the time elapsed between user visits.

[0,2,5,3,4,5,4] SBV1 [2,3,4,5,2,3] SBV2 [2,3,4,2,3]

And of course, SBV is simply a number of seconds, so lets put that in

[0,2,5,3,4,5,4] 3000 [2,3,4,5,2,3] 5000 [2,3,4,2,3]

However, instead of one long number like the one above, in some cases we like to analyze timing events seperately from the events themselves:

[SBV1, SBV2] = [3000,5000]
[SESSION1] [SESSION2] [SESSION3] = [0,2,5,3,4,5,4] [2,3,4,5,2,3] [2,3,4,2,3]

Adding additional data into the model can easily be done. This is only a start to thinking about user click streams as ‘genes’.

Nathan

Here are some further ideas:

- It may be easy to generate unique ids for urls simply by taking an MD5 of the url
- Finding the optimal subsequences of user experiences online
- Take into account other events that a user can take on a web page
- Figure out how to effectively use both timing and click sessions together in the same string

Tags: , , , , ,

How far can one think?

I have recently been paying more attention to my general thinking patterns, and am trying to deduce the optimal balance between thinking and experience when making a decision.

Experience is simply a process of gathering more information, while thinking is the process of assimilating and structuring that information but also thinking is imagining and recreating experiences. When one wants to make a decision, usually one turns to thinking and reasoning through the space. To analogize, to me its like you are a small lighted circle on a map - this is your small circle of ‘understanding’ or the whole picture you see in your mind and what you understand comfortably; and there is a fog that surrounds your little circle of understanding on all sides, covering up the surrounding territory. Thinking is the process of moving on different roads and exploring those fogged areas, so that you see the whole picture. Its important to note that it takes critical and open thinking to ‘push back’ this fog to expand your understanding and knowledge of the whole picture. This process consists basically of using logical reasoning and assumptions to think your way through the fog, and if you get stuck, you try to call on your other experiences or even ‘imagine’ how something would be to keep thinking.

However, because of how our minds work, it is often difficult to push the fog back very far - the reason is that we tend to think stereotypically and use lots of assumptions. Similarly, often it becomes difficult to properly imagine situations, let alone assess these imagined situations. Assumptions help us limit, focus, and direct our thinking, but they also prevent us from taking other roads and exploring the fog in all directions. Assumptions, then, are almost like the roads themselves - they let us think in a certain direction, much like taking a road and exploring a territory in one direction - you can’t veer from the path. However, without assumptions, we have no direction - they are very necessary. The farther and farther you move from your original starting point, what usually tends to happen is that the assumptions you make become weaker and more imagined, making it harder to move through the fog. This is why experience is so key.

Continuing with the same analogy, experience is then like a ’spotted highway’ on the map. The reason is that its much easier to understand when one experiences something first hand, its not like you are ‘fighting back’ the fog to think through it, but rather, experience just happens and understanding comes naturally - thats why its a highway, because you can understand a lot just by experiencing it, much like a highway in that you can travel great distances very quickly. However, the highway is ’spotted’ because really, experience teaches a lot of random stuff - it doesn’t necessarily carve out a large circle of understanding, but many such smaller circles of understanding scattered through the territory, that its up to you to connect.

So we mentioned that the roads in our analogy are the ‘assumptions’ we make, because they help direct our thinking. What we can do then is be self-aware of the assumptions we are making, and then challenge these assumptions. By doing this, instead of being stuck on a one-way road into the fog, we start creating side-paths that we can take and explore, which makes then our thoughts have lots of ‘branches’. Every time we drop an assumption, the possibilities open up for us to explore new options, but, of course, our path of reasoning becomes less defined; thus at some point we usually create a new assumption then (different from the old one) to create a new path for ourselves into new areas of the fog.

So what is the optimal balance between thinking and experience? This is an extremely hard question, but to answer it, I would say that more information and experience is always a better thing no matter what; that said, I don’t necessarily have a good answer, but more a quip like cliche. I would say that thinking is only necessary when a decision needs to be made, and more experience is necessary when thinking cannot provide a decision. In other words - if you can’t decide, get more experience, then decide. Simple? Not really.

Tags: , , , , , , ,

Modeling a Path to Successful

I recently read this blog entry http://lethain.com/entry/2009/jul/31/success-and-dancing-shoes/ and starting thinking on what success was REALLY about. The article had much truth to it, saying that one must position oneself amongst the right people, and of course must be willing to work hard, and there should be a sprinkle of luck. I started thinking how to model a path of success.

But honestly, I have a completely different model of the factors of success.

A key ingredient in the model of success is ‘the goal’.

What do I mean by ‘the goal?’

I mean that at some point, there needs to be an idea that can be realized as something concrete that provides real value to people (or businesses). There has to be a direction that is being moved in to create this value. If you want to be successful, you need to be associated (and possibly contributing to) the right goal.

A goal can be a new toy you are going to produce, a new internet startup based around a novel idea, or anything that essentially a group of people can use as a direction to move towards creating something of concrete value. Most of my examples will be business oriented, but this doesn’t have to be the case. All that matters is that there must be value produced.

First, you should ask yourself, is there anyone considered successful who has not been associated with a goal? I can’t think of any.

Now, once you accept that a goal has to exist, the question of ‘how do I become successful’ instead turns into something else. It becomes a matter of being associated with the right goals/directions/ideas, as well as potential goals/directions/ideas.

Everyone is part of many goals today - in fact, you should probably ask yourself ‘What goals am I pursuing?’ - one of them, if you are employed, is your employers goal of doing whatever it is the company is trying to accomplish.

The people who you surround yourself with are essentially your ‘pool’ of potential goals you can pursue. Maybe one of them is entrepreneurial, and has a goal of starting a company. Then you also have a potential to be in that company and pursue that goal.

However, the main thing you should realize is that you have your own goals! You can have an idea of something of value, and share that goal with others and pursue that goal. The important questions to ask oneself are “how can I do this better?”, or if a problem presents itself, realizing that solving that problem for yourself is also probably a problem for others, and it is a small step from solving a problem to creating a new goal of solving this problem on a larger basis.

Thus, success is about the intersection of a two things:
1. How well your defined goal provides concrete value to others
2. How well you and the people you surround yourself with can pursue that goal

The first is about measuring the usefulness of the goal - will people like this new toy? Will people use this internet service? This can be a very hard estimation, but you can improve and hone it over time with feedback.

The second is about how well you can solve the subproblems that creep up and get in the way of the greater goal. With a solid team of smarter, experienced, and well-tempered individuals, you will be able to handle these sub problems better. Some sub problems may be ‘how can I change the product to match the needs of what people are telling me they need/want?’, or ‘how can I tackle this technical challenge’ or ‘how can I get the next round of funding for our company?’

One must attach oneself to a goal, or create the goal and attach people to it. Success is merely the approach and carrying out of this goal.

Tags: , , , ,

An Important Question When Moving into Unknown Programming Territory

So you’re about to undertake a project that you have little experience with (whether it be the language) or little knowledge about at all. The first question to ask oneself is “What level do I need to be working at?”

Now, let’s say I want to write a web application, and I choose to use python-django. We start with a problem, say, ‘how do I create a user-login interface (i.e. a standard across websites - e-mail activation, etc). First, you should consider what levels are available to you. In this case, the levels (from top down) are as follows:

Django-App (Pre-Built)

Django-App (customized with Python)

Combingin Pre-Built Python Libraries That Each Do A Significant Piece (i.e. loggin in to website, storing a session)

Develop Using much smaller Python Modules that Each Do A Smaller Piece (handle an http request, parse html)

… (more levels)

Using C/C++ To Build Python modules and work with those

(lower than this is absurd for common web stuff usually!)

Often, developers can strangle themselves because they start working at too low of a level, instead of searching for higher-level solutions that will either work out of the box, or work with a small bit of customization (my preferred way). While more control is great - time is almost always a factor (plus if you use django, then you probably subscribe to the DRY principle (Don’t Repeat Yourself), and do this anyway!)

So before you start your next project, do your research (usually in the form of multiple google searches) and make sure you are operating at the correct level.

Tags: , , , ,

Further Thoughts on ‘Thinking out of that dang box’

The last post was rather lengthy, so I’ll be concise. Sometimes you don’t have time to write things down, and build up a large detailed model. If you are in a group, and the group is struggling to be innovative, here is a quick strategy to generate different thoughts. AgainThis strategy is more for idea generation as opposed to solving a problem start to finish.

The strategy is to put your problem in the form of a specific and detailed question, pick out the ‘power words’, and then ask yourself questions about those words.

For instance, in the last post, the example was “how can a rectangular cake with a rectangular slice be cut in half with one straight knife cut?”

Now, let’s use our strategy of idea generation just to wander our thoughts and see what cool stuff we can think of. Using the strategy, we parse out the important words:

“rectangular cake” “rectangular slice” “cut” “half” “one” “straight” “knife” “knife cut”

Remember, we are just generating cool thoughts at this point, nothing else. At this point, we ask ourselves whatever questions come to mind.

- rectangular cakes
“what if i threw that cake up in the air?”
“What are different types of rectangular cakes?”
“Are all cakes rectangular?”
“Why are cakes rectangular?”
“Rectangular cakes are like ‘the box’ that we can’t think outside of”

-cut
“What are different types of cuts?”
“How does one make a cut?”
“What if I used a sword to cut?”

-half
“half of what? half of the volume? the surface area?”
“what if we were in 4 diemsions, what would half a cake be?”
“what if I paid a mathematician to solve ‘half’ for me”

-straight
“straight as in arrow-straight or straight as in non-gay?”
“what else is straight?”
“what is straight but isn’t like an arrow straight?”

-knife cut
“what else could we use besides a knife?”
“what do the things we use to cut a cake with have in common?”
“what are different ways to cut?”
“how do chefs cut?”
“why do we usually cut slices like we do?”

Anyway, as you can see, you can generate a lot of thoughts simply by parsing the sentence and asking yourself questions about the individual objects, possibly connecting thoughts across domains that you wouldn’t have beforehand.

Thanks for reading.

Nate

What is the box, and what is this ‘thinking outside of it’ business?

You have heard it, whether it was from your group mates, your teacher, your boss, or someone else. “Think outside the box” they all say. Well, what does that even mean, and how do you go about doing it?

Most people don’t even realize that the box is an analogy for ‘Context.’ Thats right, context. Let’s take the statement “Girls have long hair.” This may make sense to you right off the bat, but what happens if we tried to tell a computer “girls have long hair.” The computer would immediately be confused and ask a whole bunch of questions:

- What types of girls? Human Girls? Female Giraffes?
- What is considered ‘long’? How long is long? Long relative to what?
- Where is the hair? Armpit hair? Leg Hair?
- What does it mean to ‘have’ hair? It grows on them? Do they have lots of braided wigs?

The point is that we humans - you and I - automatically infer context from statements. With “girls have long hair,” we infer that we are talking about human females whose hair on their head is longer relative to that of male humans on earth - something like that. We inferred that we are talking about humans females, that we are on earth, that the hair is on their head, without really even thinking about it.

Well I’ve got news for you… This is the box! Yes, these are all ‘contextual properties’ that make up the ‘context’ of the statement that “girls have long hair’; this context surrounds and constrains the scope of the statement so that it makes sense to you and me; it supports the statement and makes sure that you don’t think of questions such as “are we talking about head hair or armpit hair.”

Now you are aware that you (your brain) infers many things automatically. Realizing this is the first step to working your way out of it. (so called ‘thinking outside’)

The second step is then to explore the space and start questioning (My Favorite Part!). Now, let’s take another situation to think about these ideas. Let’s take a puzzle for an example.

“Given a rectangular cake with a rectangular piece removed, how would you cut the remainder of the cake into two equal halves with one straight cut of a knife?”

Now, often our first step is to imagine a cake in our ‘mind’s eye’ with a slice removed. Reasoning just in the head is the first flaw of people who can’t ‘think outside of the box’; the reason is that the mind is not that good at holding images in it for a long time — think about it, its hard to manipulate images in the ‘mind’s eye’; also, as we showed before, when you think up something in your ‘mind’s eye’ you are constraining your thoughts to a certain context - in this case, possibly a certain prototypical cake, maybe its on a table or something or maybe it is twice length by width, or something like that. This is a problem! See? Immediately your mind must constrain the thoughts so you can ‘imagine them’ in your minds eye (its just part of how the brain works); but what you want is your mind to think of differently!

Thus, you ALWAYS should have a pen and pencil, and immediately draw a picture of that mental image you have in your mind’s eye. The picture should be extremely neat so that it is easy to identify the ‘features’ of the space.

I have introduced a new term here that I want to highlight - ‘features’ of the space. These are the ‘variables’ in the space that we will be changing here and there to explore the space and find its boundaries- keep reading and you’ll get a better grasp of what I mean. Basically, these allow you to ‘find out what you can do’ in the space.

Now, back to the Cake example. So, we have a neatly drawn picture of a two dimensional cake. Mine looks something like this:

A simple rectangular cake with a rectangular slice removed

A simple rectangular cake with a rectangular slice removed

Does yours look like this too? Cool.

Now, let’s take a step back and notice a few things about our drawing. First, in our minds, it represents a cake. In our minds, essentially, it is a model, or a surrogate, for a cake. Do you notice whats going on again?

Yes, our minds are again simplifying and constraining our thinking! Show this odd rectangle to another person, and they will say “what the hell is that?” They will have no clue that it is a rectangular cake with a rectangular slice removed. This is far from a cake, but your mind has again inferred the ‘contextual properties’ of this cake;

Here’s some stuff wrong with our model:

- this picture clearly has no ‘frosting’ attributes that are visible
- this picture clearly is only two dimensional
- this picture has 90 degree edges
- a lot of other stuff

That’s why a real cake would be much more useful in trying to find the answer to our puzzle! Alas, we have no real cake, so we must get past our brain’s simplified model of a cake (and all our brain’s constraints) and try to build as good and detailed a model as we can. Then, we can explore the ‘feature space’ and try to solve the puzzle.

Let’s improve our drawing a bit, shall we?
- A real cake can have a number of toppings and frostings
- A real cake is made of cake batter
- A real cake is three dimensional (just like all objects)
- A real cake has rounded edges
- A real cake is soft and fluffly

Now, we have created a better model; go ahead and (seriously do this) draw it out (how long does it honestly take to draw another cake? It will help you in the long run I promise) mine looks something like this:

Okay, so I cheated and searched google for an image instead - big woop. Anyway, we see that our cake now has colors, it has frosting only around the edges, it even has some objects on top of it (a transformer, presumably), and a title.

Awesome, this cake is a good enough model for now. Your model must be detailed and good enough before you can begin exploring the ‘feature space’. Just think of as many details as possible, and you’ll be fine.

Let’s finally begin exploring the ‘feature space!’ As I said before, the feature space is our ‘moving room’ in the box; essentially, there are a lot of things that don’t have to be, or that could be changed. Essentially, there are ‘variables’ that we can change.

One such variable may be the color of the frosting we use; another such variable is the type of frosting, or what the cake is made of.

The first step though, is writing the properties of your model down. This means that we write down ‘properties’ of cakes. Let’s do this. Now, don’t constrain yourself to the problem yet, just write down ANY properties of cakes. This is the part where your imagination comes into play.

Most importantly, ASK YOURSELF QUESTIONS TO HELP EXPLORE THE CAKE SPACE!

Always ask yourself questions to help you explore the space!

What is it like to eat a cake? (maybe from this you’ll realize they have different textures)
What do I eat a cake with? (maybe you’ll realize how soft cakes are, or how they are even sometimes hard, or melty if they are an ice cream cake)
Where have I seen cakes? (maybe you’ll think of wedding cakes, birthday cakes, different sized cakes, different layered cakes, etc)

All these show you new properties of cakes that you didn’t see from your initial model that you drew on the paper.

Some questions constrain your thinking though, so beware. For example:
“How big are most cakes?” - (may lead you to think again of just medium sized cakes; you don’t want to constrain yourself at this point at all. If this happens, you should realize you are constraining yourself again (be self-reflective!) and should start thinking of exploring different questions).

After asking ourself many questions, our list looks something like this:

Overall Shape (circular, rectangular, pyramidal, etc)
Number of Layers (one, two, cascading, getting-smaller-as-you-go-up, same-sized-layers, etc)
Base Substance (ice-cream or cake batter)
Ingredients ( salt, butter, water, sugar, yeast, etc)
Dimensions ( rectangular, circular, pyramid)
How it was cooked (baked, however else they make cakes)
Frosting type (sugar free, sugar)
Objects on cake (symbols, physical objects, cards, etc)
Writing on Cake (names, etc)
Who the cake is for ( son, dad, brother, etc)
What the cake celebrates (birthday, graduation, anniversary)

Now, all these details are some things that we can add to our model. The physical model that we have drawn on the paper helps us identify all of these different properties, because we can infer them simply by looking at the picture we have drawn, which is great! Also, when we draw them, it helps us think of even more and envision them better! Amazing! This helps our imagination greatly.

Now, instead of thinking of possibly thousands of properties of cakes, THIS is the point where introduce some constraint. What constraints to we introduce? Well, the puzzle defines the constraints perfectly for us. Let’s see what the puzzle says again:

“Given a rectangular cake with a rectangular piece removed, how would you cut the remainder of the cake into two equal halves with one straight cut of a knife?”

Okay, so our first constraint was actually that the object was a cake. We got that down, but didn’t limit ourselves to our first thought of a cake. Instead, we built up that model of a very detailed cake before we constrained it down. (Think about how much richer your model of a cake is now, as opposed to a cake you thought of at first - see how many more ‘possibilities’ there are with a detailed model? There are more lines and avenues of thinking you can take when more details are presented to your model).

Our second constraint is that the cake has to be rectangular. So on our list, we need to make the cake rectangular, so under ’shape’ where we had ‘circular’ and ‘rectangular’, we have to cross off circular and all the other shapes. (You don’t really have to cross it off, but in your mind what you do is create this constraint that stops thoughts from propogating into that direction, i.e. into thinking about different shapes of cakes. This is basically creating a ‘wall’ in your thinking. In this cakes, circular cakes are irrelevant because they won’t solve the problem, and you need your mind to think in the right direction - rectangular cakes). This is a hard constraint, like a brick wall, which helps guide us in thinking in the right direction.

We may have other questions such as, “Okay, can the cake have more than one layer? What if all the layers are rectangles?”

These are awesome questions! Whoever asks this puzzle should tell you (i.e. constrain) the problem for your correctly. In this case, we will deal with a one-layer cake.

Our third constraint is that a rectangular piece is removed. Now, we again have to build up a rich model of a ’slice’ so our brain doesn’t limit us to a basic model.

“could it be just the top layer / frosting slice, or does it have to be a complete cut from top to bottom?” “does the slice have to be rectangular in all dimensions?”

In this example, let’s clarify and say it has to be rectangular in all dimensions, and is a complete slice from top to bottom.

Now, we should have a pretty detailed picture of the cake. Now, I’m basically going to use this method described above over and over again to solve the rest of this problem, writing my thinking out. Its really a trial-and-error, which sometimes scares people, but if you guide your direction in the right thinking, you are almost sure to find at least one correct answer. Let me write out the general strategy I showed you, and that I will be following:

1. Imagine model of what the puzzle asks in my minds eye (our mind’s eye image of a cake)
2. Draw that model down (our initial drawing of the cake)
3. Take a step back and ask myself questions about the model - anything that jogs my memory
4. Enhance the model and find as many details as possible -explore the feature space (write down details and redraw cake)
5. Write the details down
6. Use these details and identify general ‘properties’ of the system (i.e. shape / dimension / types)
7. Constrain down these properties using the constraints in the problem
8. Use constraints as guides; don’t think against constraints (i.e. don’t think of ANY circular cakes, this problem is about rectangular cakes.)
9. See what you can come up with, don’t be afraid! Never be afraid to try something, because if its wrong it gives you so much more information to make your model better!

Simplified:

1. Imagine
2. Draw
3. Enhance
4. Explore feature space
5. Constrain
6. Follow threads of thinking

Now, here we go. Starting from our ‘enhanced cake model’:

“Given a rectangular cake with a rectangular piece removed, how would you cut the remainder of the cake into two equal halves with one straight cut of a knife?”

“Where is the rectangular piece removed from?” —> The sides? The corners?

Hmmmm…..let’s try the problem if the cake slice was just removed form the corners….
I would have to have a line that bisected the cake; a normal bisector would just be diagonal across the cake…

With a slice removed, could i just start at the far corner, and then find a point that would have equal cake on both sides? –> wait, this doesn’t work, because remember we made an assumption that the slice was removed from the corner? The slice could be in the center…

Okay, so maybe there are two situations, one where the slice is in the corner, and the other if it is on one of the sides…

Let’s say its just on one of the sides… –> in the middle of the side? –> close to the corner?

Lets assume its in the middle of the side of the cake…. —> which side? small side? long side? does it matter, or are these situations symmetrical?

Hmmm… they may be symmetrical….Let’s assume that its in the long side of the cake …. —> okay

Hmmmm…..well right now i seem to be looking for one line to bisect the cake, what if i try two lines? (generalize)

Well, then where would these two lines start? –> probably at the corners?

Let’s assume both lines start at the corners, then we’d basically have to find the areas of both of these new pieces, which seems fairly difficult… –> maybe we know how to do it using pythagorean theorem, or something like that

Maybe i know how to do that, but it seems really difficult; besides, I just realized that the cake slice could be directly in the middle of the cake - I should have realized this earlier when I was trying to place the cake slices in different places - darn. Also, I forgot that according to the puzzle we only have ONE straight cut… okay, Let me go back to where I was thinking initially.

So now I realize that the cake slice can be anywhere, in the middle, corner, or edge and I see it more clearly on paper and in my minds eye, which is a better constrained model so I can think about it better.

Now, I guess I have to cut it in a straight line –> what constitutes a straight line?

Do I just have to keep the tip of the knife straight to make a straight cut, but could I move my wrist while keep the knife cut straight? –> no, that would lead to a non-rectangular slice, maybe conical, which is not allowed

Okay, lets mess with the cake as a whole. What other properties matter? What doesn’t matter? –> colors and taste don’t seem to matter, neither do whats on top of it seem to matter’

Okay, well, what general properties are important in this case? –> Space, how you divide that space

Okay, so yeah spatial properties are pretty important, what are the spatial properties of the cake? –> has a length, width, height

What can I do to the cake spatially? –> “What happens if you flip the cake upside down?”

Okay, then I guess I could cut it differently… hmmm… –> would it be easier to bisect this way?

—-> (my mind somehow makes a connection when it sees that I can cut it across wise, instead of looking at the cake from a ‘top view’, i would look at the cake from a side view and cut perpendicular to the height)

AH! Okay. I understand now. Say I were to place the cake flat on a table, and cut a rectangular piece out. Then lets say i hunkered down and looked eye level across the surface of the table so that I only saw the ‘height’ of the cake, i.e. one side. Say the cake was 4 inches tall, then at 2 inches high i would make a horizontal cut across the whole cake. This would divide it in two - into top and bottom halves, regardless of where the rectangular slice was made! We wouldn’t have discovered this if we had stayed with our original, simplified, 2D model of our cake.

The cake slices could be seen in red (if the cake was turned on its side), seperating the cake into ‘top’ and ‘bottom’. This solution does assume, however, that the rectangular cake is symmetrical along the height axis. For us, this is good enough for now.

Now, as of this writing, I got to thinking of so many other possible ways to do this! What if the cake was an ice-cream cake? Then we could simply melt the cake down into a liquid, put it into a measuring cup, and walaa, we could easily then have seperate the cake into two equal slices (more like blobs), saving ourselves a knife cut!

Let’s reflect for a second.

Its important to note that at the start of the problem we didn’t realize which properties were important. Color? Frosting? Type of cake? Shape? Over time, however, we were able to constrain the problem more; we use the constraints in the problem to get us thinking in the right direction, and we tried to never think things that violated those rigid constraints. Let me say that again, we let those guide us, we road them like a river, skimming our hands across the water to make sure we were on the right path, and we pushed the boundaries.

Especially, we were able to ask ourselves ‘which properties of cakes and cutting them are useful?’, and were able to think that spatial properties were useful and explore that area. This helped guide our trial-and-error in the right direction.

Here’s a few slogans to remember:
1. Ask yourself questions to enhance your model
2. Build a detailed model
3. Write things down
4. Use Constraints as Guides
5. Identify the ‘feature space’

Most people start out too constrained and later have trouble generalizing and finding more details. Instead, you know the following:

1. Start out very detailed and general, removing contexts
2. Identify constraints that are rigid, and those that can be removed or changed
3. Use the most rigid constraints to guide your thinking
4. When you are stuck, either go back to a previous step, or again try to remove constraints or get more details and generalize from there; most importantly again, use questions to help guide you!

Be persistent! We had to ask ourselves so many questions before we got to the answer, but in the process we thought of more than one!

Thanks for reading!

Nate

Does Children’s Nutrition Affect Gene Expression in Adulthood?

Recently, I’ve been trying to change my diet to one that is healthier and more ‘natural’ focused. From an evolutionary standpoint, our diets probably consisted mostly of vegetables and plants and some nuts (when the season was right); meat was probably more on occasion, as it was clearly harder to acquire with less tools. While this is a general conclusion, it would really depend on the resources in a given environment. Thus, an interesting question is how diet affects the genetics of a population over time. An example of this is Inuits, living in a cold climate whose primary diet is fish/fatty animals forces them to ingest a fair amount of fats, and over time they have developed lower testosterone levels (when compared to say, Scandinavian men).

Now, a thought of analogy came to my mind when thinking about this.

The brain of a child has yet to differentiate, so that early experiences have a somewhat larger impact on creating structure in the brain. Thus, we can think of early childhood experiences as creating a general framework or structure, and later life experiences almost ‘filling in’ or ‘fleshing out’ that framework with more experiences and details, which have less impact on creating the overall structure. The thought of analogy is:

How does diet play a role in creating this early overall ’structure’ or ‘framework’ in the brain? Put another way, how does early life diet affect how the body responds to different diets later in life? Does early diet ‘predispose’ an organism to process food and nutrients in a certain way?

Basically, the thought is that a child’s body and brain ‘learn’ what kind of nutrients they are getting at a young age, i.e. high protein (lots of meat, maybe savannah), high carb (lots of grains, plains), etc. The brain then begins to ‘get used to’ or ‘expect’ this kind of diet, and then signals different genes to turn on and turn off in response to this diet; some of these genes could be told to turn off forever, meaning that adulthood expression would be much different! There are probably genes that are for short term food processing(such as processing lactic acid, for example - the gene gets promoted with enzymes when lactic acid is detected in the stomach) and genes for long term processing and weight loss.

Some evidence of this would be how we know that early diet can affect height and growth. Namely, if children are malnourished through puberty, they have a smaller height on average. This is because the body and brain ‘identify’ that there is not very much food in this environment, and so the child’s growth is stunted to conserve energy in the long run, as a small organism expels less energy than a larger organism. When I say this, I mean that the body was not subjected to certain cues that indicated that it should grow tall; these cues could be, for instance, a certain threshold of nutrients that the body has ingested over time, which cause a certain growth promoter enzyme to bind to a gene that led to the creation of different proteins that ultimately led (or didn’t lead) to some sort of expression.

Thus, the early life diet has probably has a huge effect on later life, such as weight management / nutrient absorption / fat storage & loss / muscle growth.

The vision is that you would want to turn on as many good ‘long term’ genes as possible, such as the ones that easily convert fat into energy, have a low fat percentage / high muscle content, etc. From here, the question is:

How would you tailor an early life diet to match the desired adulthood characteristics?

For example, if I wanted to do everything I could to be Basketball player, maybe I would eat high protein and meat all the time to promote the long term genes to activate.

Tags: , , , , , ,

Thoughts on Changing How You Feel

Changing how you feel is difficult. Do you ask yourself “Why Do I feel this way?” or “How can I change how I feel, how can I change my feelings?”

One of the most powerful concepts that people struggle with is how to control their emotions. I’m no emotional rollercoaster, but, like everyone, I also experience my anger, my lows. Wouldn’t it be awesome to be able to start out crying, and, through some mental technique or routine, come out ecstatic? I’m going to talk about the techniques I use, and some of the shortfalls. One thing I will cover is namely the dichotomy between the objective mind and the animal mind (the emotional part), and how this is one of the main reasons it is difficult to ‘convince’ yourself to do something.

Now, there are a few techniques that seems to help, which I describe in the rest of this article. A sort of two-pronged attack I have developed is to focus, in a structured way, on both the physical and the mental. Many of these techniques you will have heard of, and while many practice them at some point, many give them up. In fact, these techniques can be extremely effective, but they must be first understood and second practiced in the correct way!

To conquer the physical feelings, I do things such as breathe slowly, sometimes rub the insides of my eyelids or massage my scalp. I also stretch different large muscle groups in my legs as well as my back, shoulders, chest, and arms. This seems to alleviate some of the feeling, and centers me a little bit by changing my mental focus into calmness and serenity. These tend to help, but don’t attack the main problem. Instead, it aids in conquering the emotional, parasympathetic, fight-or-flight response in the short term.

Attacking the mental aspect of feeling is a completely different matter. Let’s quickly and objectively overview how emotions are created and manifested, so we can better understand how to change them.

Usually, one feels an emotion due to some (external) stimulus, such as a bad grade or harsh words from a boss. When we say stimulus, we mean how the event looked, how it sounded, how it felt (touch), how it tasted, or how it smelt. Now, at the moment of stimulus, the body takes in all this information and builds an internal ‘model’ that describes this situation. By model, we mean that the body builds some sort of internal representation to remember all this information using neurons, etc. At the point of stimulus, the body also associates your initial feeling with that model, such as ‘angry’ or ’sad’. Thus, whenever you think about that same stimulus, your body looks up the stored model in memory and sees how you felt before, which tends to push you to feel that same way again*. Similarly, this outside stimulus creates a chemical and neurological reaction within the body which only propagates that feeling. From this, we can objectively see that feelings and emotions are simply interpreted responses to external stimuli, a so-called chemical cascade.

The next step involved is trying to change that provoked thought pattern by speaking and reasoning to oneself internally. For example, if some one spilled milk on me, I could try to reason with myself, saying its not a big deal and that I could just wash my clothes afterward to allay my oncoming anger.

However, if anyone has ever tried this technique, many would note its extreme shortcomings. What shortcomings? Well, let’s again take the example of getting spilled on by some milk. As soon as the milk is spilled, my initial reaction is negative, almost angry, and internally it is almost like I am anticipating more anger, like I can feel it building up inside me. At the same time, however, my objective mind is keeping cool; my objective mind has seen the spill, and I am telling myself ‘its no big deal’, and begins working reassuring myself its no big deal. “Really, I don’t feel bad at all,” I tell myself with my objective mind.

Maybe this helps a little bit, maybe, but really it FEELS inadequate. Most of the time, I can still feel the oncoming emotion build up. The external stimuli has triggered the chemical cascade inside me, and its too late to stop the oncoming emotion, no matter how much I reason it through. Its a really weird feeling, knowing that you shouldn’t and don’t want to feel one way, but having your emotions control.

Now, at this point, many people quit. They have reasoned through it, and they have ‘done all they can do’. In fact, there is another step! Many simply give into the emotion, and let it slowly make its way. What must be done, however, is hard! What you have to do is focus on the end goal. Focus on the feeling that you want to feel, and actively take steps toward it! Maybe it seems stupid, but you have to cure emotion with a different external stimuli! Taking action is the key to solving the problem! And while reasoning through some things tends to allay some emotion, the stimulation needs to cause a chemical and neurological reaction to help counter the first.

It’s important to note the different stimuli in this situation. There are two, in fact. The first stimulus is the external one that causes the emotion to occur, while the second is YOU telling YOURSELF. That’s right, when you speak to yourself, you are actually activating some of the same parts of your brain that are activated when you actually hear something, or when you speak. Thus, the brain probably distinguishes the difference between external and internal stimuli. It filters what you tell yourself internally, so it essentially takes control away from what you can stimulate your body to do. Thus, convince yourself all you want, your brain could be wired to dampen or even ‘ignore’ that self-reassurance or any commands you tell yourself. This makes sense for a few reasons - one, it may be dangerous to allow us to control our own bodies (as our consciousness is rather linear, and ill-equipped to handle such complex activities such as fighting infections, etc.), - two, it may be that while your objective mind holds the focus of your consciousness (as opposed to focusing on pain, or on depression), that this somehow releases control of the animal mind to proceed with building up the emotion. It may be that the mind just hears itself talk all the time, that it becomes less familiar and more numb to internal commands or speech.

Let’s Talk About Chemicals For A Second.

Reasoning something out and attacking from a perspective is in fact effective, and let me tell you why. It could be that external stimuli have a greater capacity (as opposed to internal reassurance) to cause a chemical cascade of emotion.

What we have to understand is that in the chemical world, reactions take time. Internally, once your emotions have been provoked, they build up some momentum; reversing chemical reactions, whether it be in a test tube or in the body, is very hard! The body takes time to revert to previous or normal levels! Who knows the full extent of the parasympathetic, fight-or-flight response in the body.

What happens is that your objective mind is sometimes much quicker than the emotional cascade. You can reason through the situation, yet your emotions are just getting revved up. The remedy is thinking through the reason for this emotion, taking action (as earlier stated), but it takes time for this to process. Have you ever felt really mad, then you thought it through, went to bed, and felt completely better or different the next morning?

Thus, I would say the main point is that our bodies can quickly create strong emotions, but that our body is slow to process our reasoning. Maybe this is because hormones and enzymes can quickly be released, but that neurons are slow to grow and connect.

I wouldn’t say the purpose of an emotion is to cause you to reason through something, but thinking is usually a by-product of emotion.** Words allow us reason through things so that we don’t provoke the same emotional responses, or so that we can reason through the ones we have (which seperates us from animals!, who may have their own way to cope with emotions, such as licking themselves). In some cases, we need to reason and try to understand, such as when a loved one dies. In other situations, such as spilling milk, we can quickly refer to previous times we have reasoned through this similar situation. Over time, our emotional response can be dampened! The process though is like any other, it takes practice and reasoning. Isn’t that great?

Some other complex and interesting problems may be:

Are some emotions/feeling more primitive than others? I.e. is anger and hunger more basic than ambivalence?

How is the role of the emotion changing today in the modern world? What role is it playing, and how is this different from before? Using this information, can we speculate as to how human thinking could evolve?

Because many drugs can create ‘false’ emotions (not based on external stimuli), does this confuse our brains? We don’t reason through the emotions felt by a drug, because we expect the feelings. Because we don’t reason, we don’t stimulate our mental thinking to change at all; how is this manifested in the brain? In Neurons, and over time in our overall emotional responses to different situations?

*(When one tries to ‘remember’, essentially what they are doing is trying to ‘hallucinate’ how things were when they were stimulated. By ‘hallucinating’, we mean that the mind tries to make you feel like you are in that same situation (i.e. you can see in your mind’s eye what was happening, you can almost hear the harsh words, you can smell the stink of the breath, etc.) Thus, the ‘remember’ process is associated with recalling all the stimuli of a given situation. Included in this list of stimuli is how you felt - emotionally - at the time. Thus, by ‘remembering’, you are telling your body to put you back into a stack of that emotion. We tend to think that it is the words that do this, but really words are just a ‘road map’ into accessing different parts of our brain. More on this in another article)