text:
# Three monotonically decreasing word sequences

A simple puzzle: given below are three word sequences. Each of them decreases monotonically (and two of them also decrease linearly). What is the next word in each of these word sequences?

INSIST, ACCIDENTAL, WHY, WAR, PIE, LAG, BEE, ???

FUNKY, TOUGH, ENIGMA, ATTIC, MIX, EYE, TEN, ???

TECHNOLOGISTS, THERMOSTATIC, RECORDISTS, PROJECTS, ATTRACT, GOATS, KITE, ???

The next word in the first sequence was already found by Techidiot, I'll include the answer here to make this post complete.

If we give every letter a numerical value according to $\text{A}=1,\dots,\text{Z}=26$, we can give each word a numerical value by taking the sum of the values of its letters. We get the following sequence. \begin{align*}\text{INSIST}&\to 90 \\ \text{ACCIDENTAL}&\to 72 \\ \text{WHY} &\to 56\\ \text{WAR} &\to 42\\ \text{PIE} &\to 30 \\ \text{LAG} &\to 20 \\ \text{BEE} &\to 12 \end{align*} So the numerical sequence is \begin{align*} 90,\ 72,\ 56,\ 42,\ 30,\ 20,\ 12\dots \end{align*} The differences between these numbers are \begin{align*} 18,\ 16,\ 14,\ 12,\ 10,\ 8\dots \end{align*} This suggests that the last word must have a numerical value of $12-6 = 6$. There are 32 possible strings of letters with this numerical value, namely F, AE, BD, CC, DB, EA, AAD, ABC, ACB, ADA, BAC, BBB, BCA, CAB, CBA, DAA, AAAC, AABB, AACA, ABAB, ABBA, ACAA, BAAB, BABA, BBAA, CAAA, AAAAB, AAABA, AABAA, ABAAA, BAAAA, AAAAAA. An excellent band is a possibility, but there is only one string that can really be considered a word. So for completeness: \begin{align*} \text{CAB} \to 6 \end{align*}

The next word in the second sequence.

The $n$th word in the second sequence uses $9-n$ dots and $9-n$ dashes when the word is written in Morse.
\begin{align*} \text{FUNKY} &\to\ ..-.\ ..-\ -.\ -.-\ -.-- \\ \text{TOUGH} &\to\ -\ ---\ ..-\ --.\ .... \\ \text{ENIGMA} &\to\ .\ -.\ ..\ --.\ --\ .- \\ \text{ATTIC} &\to\ .-\ -\ -\ ..\ -.-. \\ \text{MIX} &\to\ --\ ..\ -..- \\ \text{EYE} &\to\ .\ -.--\ . \\ \text{TEN} &\to\ -\ .\ -. \end{align*} So the last word should use one dot and one dash. A dot translates to the letter E and a dash to the letter T, so if we view them as separate letters we can make either TE or ET. If we string the dash and the dot together we find that $-.$ translates to the letter N and $.-$ translates to the letter A, which is also a word. So for completeness:\begin{align*}A \to\ .- \end{align*}

The next word in the third sequence.

If we write all the words (in lowercase) in braille we get the following.

A character in braille has six positions where there can either be a dot or not. If we count for each word the number of dots appearing in each position we get the following sequence. \begin{align*} \left(\begin{array}{cc} 8 & 8 \\ 8 & 8 \\ 8 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 7 & 7 \\ 7 & 7 \\ 7 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 6 & 6 \\ 6 & 6 \\ 6 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 5 & 5 \\ 5 & 5 \\ 5 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 4 & 4 \\ 4 & 4 \\ 4 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 3 & 3 \\ 3 & 3 \\ 3 & 0 \\ \end{array}\right),\ \left(\begin{array}{cc} 2 & 2 \\ 2 & 2 \\ 2 & 0 \\ \end{array}\right) \end{align*} So we are looking for a word that only has one dot in these five positions. There is one letter that satisfies this, namely Q. There are 8 combinations of two letters satisfying this, namely AT, ES, IO, JK, KJ, OI, SE, TA. There are no combinations with more letters that satisfy the condition. Now I think AT is the only possibility that can be called a word.

For completeness:

• Ah, GHOST is not correct I see, should have been GOATS, I'll make amends. As for the two options: if you count all positions separately you'll see there's only one possibility. You already picked the right one, though ;) I think it's OK to include Techidiot's answer to the other part, as long as you give him credit for it. – Levieux Mar 8 '17 at 13:12
• @Levieux Ah, I see :). Thank you for the fun puzzle, I will edit my answer soon to include this new information. – Pjotr5 Mar 8 '17 at 13:22

Partial

INSIST, ACCIDENTAL, WHY, WAR, PIE, LAG, BEE, ???

Difference between each word value is 18,16,14,12,10,8, so the next difference should be 6.
INSIST $\rightarrow$ 9 + 14 + 19 + 9 + 19 + 20 = 90
ACCIDENTAL $\rightarrow$ 1 + 3 + 3 + 9 + 4 + 5 + 14 + 20 + 1 + 12 = 72
WHY $\rightarrow$ 23 + 8 + 25 = 56
WAR $\rightarrow$ 23 + 1 + 18 = 42
PIE $\rightarrow$ 16 + 9 + 5 = 30
LAG $\rightarrow$ 12 + 1 + 7 = 20
BEE $\rightarrow$ 2 + 5 + 5 = 12
CAB $\rightarrow$ 3+1+2 = 6
Hence, CAB is the next word in the sequence.


text:
## Tuesday, October 31, 2006

### Oscar baiting

CK normally handles movie related posts here on the Dossing Times, however I feel compelled to write a quick note on Oscar baiting.

I recently went to cinema here in Sydney (shameless location plug, i know) to see the Departed and Children of Men, both highly recommended, especially the latter. However both trips were tarnished somewhat by having to sit through a trailer for Clint Eastwoods new movie "Saving Private Ryan Phillippe" or, as the studio is calling it, "Flags of Our Father". When the trailer finished my friend turned to me and commented that "Clint is trying very hard to win an oscar".

I am also of the opinion, for example, that Sean Penn will not take on a role unless it affords him a shot at an oscar. With Sean this means he'll gets to shout alot which is pretty much all he's good at. Clint also strikes me as an Oscar hunter.

I just get that odd feeling that trying to win awards was the directors, actors etc. biggest motivation more and more. Its hard to quantify, but its a similar feeling I get when watching that overly sentimental Home Make Over Tv show, where you just know the ultimate goal is to make the family cry (You know the show, its basically Pimp my House). Ok, they're doing a good thing, but the ulterior motive just sours it for me.

Of course trying to win an Oscar has been around for as long as the Oscars. However is it me or is it getting more shameless and more frequent? It just seems rather backwards to me.

They're putting the cart before the horse as my Grandfather would no doubt comment.

## Monday, October 30, 2006

### Dinner

Yesterday I was in a fishing village and bought myself a sea bass fish. Note to self ask the guy to fillet the fish for you.

Anyway with my murdered Fillets. I did the following. However with a few modifications. 1. I used a red wine instead of white. Why you ask. Well that is all I had. Also I added garlic pepper to the mushrooms.

Very yummy but expensive. Finished with so various cheeses with some wine. Cheshire and Wensleydale with Cranberries.

## Sunday, October 29, 2006

### Today's dinner

Smoked Haddock in a tomatoeish sauce with My flat's mates mums Rice.

For the rice.
Take some cinemon a small bit,
A clove of garlic.
Olive oil,
half a cup of water.
Mixed herbs
and 1/2 a chicken stock cube
salt and pepper

And all of the above to a pot and bring to the boil.
Next add rice and cook as normal.

Take the smoked Haddock, ¼ pint of milk, chives, some cinnamon salt and pepper and bring to the boil. Then let it simmer for 2-3 minutes.
Take some tomatoes from a tin of tin tomatoes. About 2 table spoons and a bit of oil. And heat it up for about 2 minutes.
And serve.

## Saturday, October 28, 2006

### This Week I have mostly been Eating

I have been lacking in inspiration for what to write. So I am going to write here what I am going to eat all this week for dinner. Anyway today .
I am eating a saddle of Lamb coated with stuff.
To make the stuff. I have blended in my blender
A nice bit of mint sorry for lack of measurement I would say a table spoon
Black pepper just a pinch
Red Wine
Crushed Clove Garlic
Sweet Chilli dipping sauce
and a wee bit of soy sauce.

And then I have spooned the stuff on to the lamb and spread it over the lamb.
Then put it in the oven at 230 degrees.
It is currently in the oven so I will tell you when it is done what it is like. I am serving it with mash. It was in the oven for about 40 minutes
Update: Just finished it. MMM dahm tasty I will have to make it again some time. Could have used spring onions in the mash but I had none.
Anyway I have Haddock in my fridge so I will come up with something to use that tommorrow.

## Friday, October 27, 2006

### Mobile masts

A democracy isn’t it great. It allows all types of people to run for election whether they are right or wrong. Take this for example. Last weeks Nenagh Guardian (Free reg regd) reports that

A group lobbying against the erection of mobile phone masts are considering running a candidate in North Tipperary in next year’s General Election.

The group, known as B.E.S.T. (Better Environmental & Safer Telecommunications), held a meeting in the Abbey Court Hotel in Nenagh on Saturday last to discuss running candidates in a number of constituencies.

Now firstly I would like to state all the scientific evidence that supports the belief of some people that mobile masts harm people.

As you can see from the above list there is massive amounts of data to support this claim. As you can see I have linked to no studies because well there is no studies, certainly none that I can find from good sources if anyone can point me to one please do. I could say that this is rise in Anti-mobile masts groups due poor science education in the country especially physics but however true that might be it is a cheap shot.

There has been numerous studies done that have not been able to prove any connection. And the basic reason is this.

$I = \frac{P}{A} = \frac{P}{4 \pi r^2}.$

$I = \frac{P}{A} = \frac{P}{4 \pi r^2}.$

I is the intensity P is the power and r is the distance from the mast. Basically the power decreases by r^2. So the further away from the mast you are the less the intensity. And this value decreases by a lot. The average mast would be lets say 10 meters high. That means the intensity at the bottom of the mast has dropped by a factor of 100. (Technically there would be no signal at the bottoom of the mast as the angle of output means a few meters around the mast get no power anyway) Now a mobile mast has maximum of 16 channels but seemingly 4 is typical. So lets take 16. Now each channel is going to be connected to a phone so that a mobile phone is going to broadcasting a signal equal to the power being sent to the mast. So basically the power that your mobile phone emits at is going to be at a maximum 1/16th of the power of the base station. So for you to get more microwave energy from the phone mast at full power that you are standing under then you phone, your phone would have to be about 6 meters from you.

How close is your phone from you right now? How many other phones are also within 6 meters of you? Are you right beside a mobile mast?

But I suppose that does not matter masts look dangerous, microwave radiation has the word radiation in it and people use words like cumlative dose which sounds technical so people believe it. And when do we let facts get in the way of a good scare story.

## Wednesday, October 25, 2006

### Hot Fuzz Teasers

The Teaser from the Hot Fuzz the new film by the Spaced Shawn of the Dead guys. Note the referance to the previous film.

### Vincent Browne Shut the feck up

Yet again Vincent Browne is going on about how the media is not doing enough about inequality
In the coming election campaign, not a single newspaper, radio station nor television station among the mainstream media will campaign for a radical restructuring of Irish society to achieve a far greater level of equality than exists
For feck sake Vincent you have your own magazine, your own radio show, a column in the newspaper of record and a column in the leading Business paper what more do you want? You are Ireland's leading commentor no one else has this level of exposure to write their views. Maybe you should be the one doing more.

The report stated: "Excluding social transfers [ such as unemployment benefits, child benefits and pensions], the risk of poverty rate would have been close to 40 per cent [ of the total population]". The report states that, without social transfers, nearly all old people (87 per cent) would be at risk of poverty.

The realisation that two in five people in this massively wealthy society are dependent on social welfare payments to keep them out of the "at-risk poverty" bracket, and that nearly all old people here would be at risk of poverty were it not for social welfare payments, is shocking

1. Why are you highlighting Excluding social transfers surely that is what you want more of?
2. How many times do I have to go on about "at-risk of poverty" and how it is a made up figure. See this is why we need more people doing science in this country. So people can look at statistics not the actuall scare headlines that go with them but the actually numbers and how they are calculated. And see that being "at-risk of poverty" does not mean you are poor or even in danger of being poor it means that statistical your income is 60% of the median. The median can be quiet high (and in Ireland it is) and in other countries quiet low (as Germany) thus the amount of money to put you at risk of poverty in Ireland in Germany means you are not at risk of poverty. Even someone with less money in their pocket in Germany (even taking into account cost of living) then someone in Ireland can be considered not poor but the person in Ireland could be "at-risk of poverty". How does that make any sense.

## Tuesday, October 24, 2006

### Fianna Fail Bloger on the Radio

Damian Blake of Fianna Fail shows how blogs get you noticed especially when you go against the Fianna Fail party line

### That will show them pesky Israelis

The Irish Times Letter's page is always a source of ammusement. Today is no different. Cathal Kerrigan suggests
I wish to propose - in all seriousness - that any boycott of Israel should include a ban on its participation in the Eurovision Song Contest in May 2007.

As Dana International was clearly a Mossad agent I think this will bring the nation to it knees.

## Monday, October 23, 2006

### Thinkhouse PR posts

Google Seems to have banned this post from Damian so here it is.

Hi everyone in Thinkhouse PR! As promised, here is my formal complaint to the Data Protection Commissioner for being repeatedly spammed by you on behalf of your clients. Just so you know I’ve also, as promised, contacted Three, Imagine and Ben and Jerry’s Ireland and asked them to investigate why I am getting spams about their products from you.

I’m writing to make a formal complaint against Thinkhouse PR for continually sending unsolicited emails to one of my email accounts despite being asked not to. The email account in question is info [at] irelandoffline.org a part-time non-commercial voluntary group.

Enclosed are 5 sets of documents. Thinkhouse contacted info@irelandoffline.org (which is shared with a colleague John Timmons) initially on behalf of their client Imagine who were releasing a new broadband product. We did not ask to be put on further email distributions for Imagine or for anyone else.

Despite this, on Fri August 4th Jane McDonald from Thinkhouse sent an email promoting an initiative from Ben and Jerry’s. (See document No. 2) Ben and Jerry’s are a client of Thinkhouse. My reply to this unsolicited email is at the end of the document.

Jane McDonald replied to this (see document No. 3) and gave the excuse that there was some kind of slip and my email address was put into a personal circular. I would not consider it was a personal mail. Jane seems to suggest that Thinkhouse are aware of spamming laws.

On August 18th Thinkhouse PR sent me another mail, a press release for the mobile phone operator “3”. (See document no. 4. This document is the back and forth communication between myself and Thinkhouse PR.) At the top of the document is a communication from Jane McDonald telling me once again I’m off everyone’s list after I again requested it. Jane also admits to using my email address without permission to add me to their mailing lists.

On August 22nd (see document No. 5) Andrea Horan from Thinkhouse PR again sent me a PR, this time for another of their clients. This one for Moviestar.ie.

I wish for the Data Protection Commissioner to investigate this and carry out a prosecution if needs be. I am willing to travel to Dublin, I am willing to make a written statement and I am willing to testify in Court if the need arises. Thinkhouse PR is contravening the Irish Spam Legislation and it is totally disregarding my repeated requests to stop being sent information. I have also asked for my contact details to be removed from their systems and this has been disregarded too.

## Friday, October 20, 2006

### And you thought Gitmo was bad.

Peter Andrea and Jordan sing A whole new World If you think you are hard enough.

## Thursday, October 19, 2006

### Oh Dear

What kind of person do you need to be to govern Russia? When you can come out with this shite.
After that, the press was ushered out, and the president apparently thought the microphones had been turned off. “Say hi to your president,” Putin said. “He turned out to be quite a powerful person! Raped ten women! We're all amazed. We all envy him!”

## Tuesday, October 17, 2006

### "Fixing" the News?

Those of you who frequent this blog will no doubt be aware of the high esteem we hold Jon Stewart and the Daily Show in. Those of you who didn't know this now do (have a cookie to celebrate!). In it's early days one of the shows slogans was, "When News breaks....we fix it"! Here's what they meant by it.

## Monday, October 16, 2006

### Terror at the Movies

On the 5th anniversary of the terrorist attacks on New York and Washington, United 93 and World Trade Centre have reached our screens but what purpose have these movies in telling these events?

Mild Spoilers

The context of each movie and the scale of the commentary each makes on the events of 9/11 are somewhat paradoxical. World Trade Centre is set amidst the heart of the disaster; it fleets to different spots on the globe as the events unfold, sees marines return to duty and sees the main protagonists entombed in what was to become Ground Zero where Bush was to make a pledge for vengeance days later. However in this movie, Stone proposes no theory behind events, does not accord blame, Bush is glimpsed fleetingly on a TV screen and terrorism barely earns a mention. You are dragged into the raw reality of the moments of crisis and claustrophobic waiting endured by the men and their families. Equally, United 93 tells an intimate story, the real life events have no footage or monumental destruction to commemorate their tragedy. It is a story of heroes so the movie has no time for who or why this blind fear and tragedy has struck the nation, it must simply be dealt with.

World Trade Centre is the far more melodramatic of the two but not unnecessarily so. It would be easy to disregard it as over sentimental theatrics. However, these are the moments in life when we are stretched and when the luggage we carry around unnecessarily with us every day has to be forgotten. This is when you get to talk in Hallmark abstracts about human nature because these are the times when it flourishes. Maybe at the offset you will flinch or grimace at the sight of an officer returning to the police department, a trail of tears running a river through his dusty face. But spend the rest of the movie gasping for air with the men and step back from all that has happened since. 9/11 has come to mean so much more than the events of a day. The attacks have been drowned out by the war on terror, WMD inspections, failed UN resolutions and airport security checks. If we are going to do justice to the victims or somehow try to portray what happened on the day then give it the respect it deserves. Bush-bashing and fervent reminders of the countless undocumented loss of life elsewhere has its place but it should not be used for mudslinging to undermine a reminder of what people went through.

United 93 strives for the same effect but is an entirely different creature. There is no glazed cinematography or stylistic director trademarks. There are no establishing shots revering New York offering any sort of numbing agent for what you know is to come. The camera keeps you level with the people aboard the plane, the air traffic controllers and officials dealing with the crisis from outside. I have talked before about movies serving as a means of escapism but this movie traps you right to the dieing moments of the last shot. You meet the hijackers, you almost get to know them better than the other passengers, sharing in their anxiety and watching them say goodbye to their families. There is no relief or let up, each scene progresses so that you feel more tense and uneasy. How many other films can instil such dread when we have known the ending for 5 years?

Both movies admirably shoulder the responsibility they are laden with. There was no option to base the film closely on the facts or play with the truth. Equally though in constructing the story they wanted to tell, these filmmakers have had to dip into a story half told, or really we don’t know what percentage we’ve seen. In choosing how to depict what we know, they have clung to the one definite in all of this- people are resilient and in all of our uncertainty, if we can't know for sure what matters what we always have is what we do. The people caught up in this ill-fated day did well. We shouldn’t need such a crisis to shock us into being decent whole people.

### Unique Idea

I just turned on my MP3 player and listened to the Stone Roses to I want to be adore and I was overcome by this compulsion to write to create to put down something unique that has never been committed to paper before. And so this is it my piece of originality that I am inflicting on the world. I know that this sentiment is in itself nothing original, the quest to create something original has been written about so many times. But never has it been put in these exact words. That is the uniqueness of it.

Now I do not have the writing talent, nor do I have the musical talent to create something like the Stone roses could, in fact my abilities are probably pretty average. But I still have that desire to create something original. I am currently doing a PhD in physics because simply put I love physics and it influences they way I think on pretty much everything. Not to sound totally ponce but it sometimes lets me see the beauty in things that in them selves pose no traditional beauty. One of these things is lights in a night club. I can just stare at them transfixed by them. Marvelling at all the physical processes that is needed to create them and allow me to see them. Just watching the simplicity of such an un-simplistic system. Thinking of all the great minds through out history that were needed for me to be able to stand there and know how it works. The way the light changes, the equations that govern this. The simplicity of its genius. I could wax lyrically about those lights for hours and after a few drinks possibly longer.

But physics lets me see in levels that many people cannot. Simply listening to my music (I am the resurrection Stone Roses now.) Just thinking of the physical process’s, my ear vibrating, the ear phone vibrating, the electrons moving in the circuits in seemingly random motion but governed and indeed the idea at on point in time a guy moved his arm up and down and struck a drum, which caused a sound wave to move through the air from the drum to a microphone where it was recorded for eternity. In my minds eye I can see the drum the cover of the drum changing morifing, due to the pressure excreted by the drum stick. The drum releasing some of the energy in the form of a sound wave. That same sound wave that now over 15 years later is causing my ear to vibrate.

Just seeing the world in all that complexity and also seeing it in its simplicity is awe inspiring. And I guess that is why I am doing a PhD in Physics. The idea that me little old me Simon from Tipp can place into the world one unique idea something that explains something or creates something new however trivial. That is the beauty of research, that is the beauty of an Unique idea.

## Sunday, October 15, 2006

### Suduko

Do you find Suduko hard? Maybe you should try the Limerick Leaders one. They give you a wee hint. ;)

## Friday, October 13, 2006

### Cider Renaissance

The UK branch of the Bulmers brand, Magners, is reporting substantial increases in the popularity of cider, so much so that the company cannot meet demand. The reversal of fortune and perception of the brand is due to what the British Independent reports is the marketing success of the decade.

## Thursday, October 12, 2006

Here are two fashion /Beauty blogs to check out. Beaut and Style Treaty.

I have talked about male beauty products before here. Marketsexuals.

### Deliever us from Evil

This is causing a stir on liveline

### Ban all donations

I think I once said that there is nothing wrong with corporate donations. My argument was that the corporate donation does not make a politician corrupt, the politician makes the donation corrupt. But with the revelations from Bertiegate and Tim O’Malley’s details of Labour and Fine Gael donations, I have changed my mind. Corporate donations should be stopped but not just corporate donations. All donations.

## Tuesday, October 10, 2006

Youtube, the phenomenally successful site for sharing videos, is to be bought by Google in surely what will serve to be a classic case study in asserting dominance in a market place.

Youtube, which has become a staple feature of browsing online is in fact less than a year old and will be bought for the princely figure of \$1.65 billion, It’s co-founder, Chad Hurley, contends Youtube will maintain its independence and identity to a significant degree.

## Monday, October 09, 2006

### Me in the Irish Times

Just realised I got a mention in the Irish Times on Saturday. Can read the part I am in here.

### North Korea has the Nuke

Great isn't it. I suppose it is America's fault because they have them. But in all seriousness maybe it is. Maybe if more attention was put on North Korea then Iraq this would not happen.

## Wednesday, October 04, 2006

### Air Blade Technology to the rescue

Find here the link to an article which is really not worth reading beyond the first paragraph. I'm sure its important to someone, but certainly not to me that, James Dyson of vacuuming fame, has applied his technological expertise to the world of hand dryers so as to help us overcome emerging from pub bathroom facilities with damp hands.

## Tuesday, October 03, 2006

From RTE.

Pitt hires Beckham to teach his son

## Monday, October 02, 2006

### Summer Movie Review

Each of the movies below were some of the most hyped and likely to be most successful movies of the year (in the case of Pirates it seems of all time!). When and where we saw them might serve as benchmarks for different events or stages of our summers. Perhaps our summers are never as life changing or the journeys of growth so often depicted in movies but for me the movies themselves are the best vehicle of escapism we allow ourselves. That and a six month trek to New Zealand of course! Highlights of the summer not included in my preview list from last May include the noir high school drama ’Brick’, Al Gores’s documentary ’An Inconvenient Truth’, ‘Dave Chapelle’s Block Party’ intermingling the music and organisation of Chapelle‘s free Brooklyn concert, ‘The Science of Sleep’ from the director of ‘Eternal Sunshine of the Spotless Mind’, Tommy Lee Jones directorial debut ‘The Three Burials of Melquiades Estrada’ and ‘Monster House’ the best and most original of the summers spate of animated movies. Below is a short review of each of the movies I listed as worth our viewing time this summer:
Mission Impossible III
Fans of Alias, J.J Abrams’ now retired spy drama series will know that Mission Impossible III was effectively a 2-hour episode of the show. From telling a section of the story in flashback, double crossing and triple-crossing within the organisation to characters being lifted directly from the show there is an over boding sense of familiarity. Cruise selected Abrams as director having watched the first 2 series of Alias, which contains some of the best hours of television I’ve ever seen, so I can’t help feel disappointed at the outcome of the movie, lacking the tension, tight structuring and complexity of Alias. There is spectacle, thrills and a bridge set kidnap attempt will surely be one of the action sequences of the year but these glimmers are strung together by slivers of character, over long exposition and a saccharine sweet ending. Philip Seymour Hoffman is excellent in his role but as with Kevin Spacey in Superman, discussed below, you can’t help but wish he was put to better use. Far superior to its predecessor and absolutely worth an evenings viewing on DVD, this movie is beleaguered by unfulfilled potential.
X3: The Last Stand
Many people have been disappointed by the third instalment in the X-Men series. More lumbering and fractured than Bryan Singers’ work, the movie did seem to loose some of its epic feel. The story of Dark Phoenix was one of the most dramatic and popular in the X-Men comic book series, here it effectively bookends the movie and feels under-developed. Nevertheless, the movie remains strong on story, numerous as they are and respectful of the core characters. Each of the stunt sequences and effects are necessary, glorious eye fodder and tied to the story with the build up to and confrontation between Wolverine and Phoenix on Alcatraz being a highlight of the year for me. Nacho Libre
‘Nacho Libre’ was a surprise gem. Produced by Nickelodeon your are unprepared for the strangely engrossing hybrid of Laurel and Hardy buddy slapstick, the look of chop socky martial arts movies and the feeling you are watching a period Mexican movie. The result is that what could have been an over familiar, seeming retread of the story line of ’The School of Rock’ is given a feel good, broad based humour and affirming story.

Superman Returns

I have already reviewed Superman Returns (here). I would also recommend reading Empire Magazines excellent online review. No movie this year has been made with such respect and care and we were presented with the most grown up comic book adaptation yet produced. Not since Sleepy Hollow have I been so drawn into a movie world by its look. The cast are pitch perfect, the nods to previous Superman incarnations wink knowingly at fans and I want to gush endlessly about the awe this movie from the opening trill of its score stirs up.
Pirates of the Caribbean: Dead Mans Chest
If the summer belonged to one film, it was Pirates of the Caribbean and not unjustifiably as Dead Man’s Chest is the most fun we have had at the cinema this year. Topping every chart and box office poll imaginable, these set of characters with Captain Jack Sparrow affirming his movie icon status and a sense of adventure not seen since Indiana Jones have developed a loyal and enthusiastic fan base. All the elements were in place to recreate the magic of ’The Curse of the Black Pearl’ and though this follow up is certainly not on a par with the first Pirates, it is not so much that is disappoints- it is still rip-roaring and sets the stage for a fascinating conclusion next summer.
Miami Vice
I don’t have a lot of respect for people who sit through and pin point mistakes and minutiae plot point failings in movies. Maybe it is some deep set need to affirm their intelligence and people are entitled to their opinions but for me it just seems to instil a pettiness that proliferates in the world I use movie watching to escape. Anyway I’m sure such people would have a field day with Miami Vice, which does suffer from a coherency of plot and a logical progression. However even to judge the movie as a whole with the gravitas a Michael Mann movie is usually partnered with, I was unable to feel the seriousness and intensity that was so desperately being churned out on screen. None of it is believable or gripping. Fox and Farrell play a well established team, Mann intentionally dipped into their story at a stage where they knew each other so well there was little need for dialogue between them or any form of exposition of their working relationship- it is never really made clear if they are even friends. The monotones of the LA backdrop seem to seep into the characters and atmosphere of the movie, not leaving you with any strong feelings towards the movie, just merely one of indifference. Even movies that are reviled leave a mark, Miami Vice however will not.

Timing and release dates have meant that I have not seen ‘The Sentinel’, ‘The Da Vinci Code’ or ‘The Omen‘. If anyone reading has seen and would like to comment on these movies, please do. I have yet to see ‘World Trade Centre’ but I intend to.

format: plain


text:
# 1047. Guardian of Decency

Frank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he is afraid that some of them might become couples. While you can never exclude this possibility, he has made some rules that he thinks indicates a low probability two persons will become a couple:

• Their height differs by more than 40 cm.

• They are of the same sex.

• Their preferred music style is different.

• Their favourite sport is the same (they are likely to be fans of different teams and that would result in fighting).

So, for any two persons that he brings on the excursion, they must satisfy at least one of the requirements above. Help him find the maximum number of persons he can take, given their vital information.

### 输入格式

The first line of the input consists of an integer T ≤ 100 giving the number of test cases. The first line of each test case consists of an integer N ≤ 500 giving the number of pupils. Next there will be one line for each pupil consisting of four space-separated data items:

• an integer h giving the height in cm;

• a character ‘F’ for female or ‘M’ for male;

• a string describing the preferred music style;

• a string with the name of the favourite sport.

No string in the input will contain more than 100 characters, nor will any string contain any whitespace.

### 输出格式

For each test case in the input there should be one line with an integer giving the maximum number of eligible pupils.

### 样例

Input
2
4
35 M classicism programming
0 M baroque skiing
43 M baroque chess
30 F baroque soccer
8
27 M romance programming
194 F baroque programming
67 M baroque ping-pong
51 M classicism programming
80 M classicism Paintball
35 M baroque ping-pong
39 F romance ping-pong
110 M romance Paintball

Output
3
7

18 人解决，36 人已尝试。

19 份提交通过，共有 100 份提交。

6.2 EMB 奖励。


text:
• # question_answer 31) Ravi purchased 5 kg 400 g rice, 2 kg 20 g sugar and 10 kg 850 g flour. Find the total weight of his purchases. TIPS Firstly, write the weight in kg using decimals and then add by putting one below other same as whole numbers,

Weight of rice purchased by Ravi = 5 kg 400 g = 5 kg + 400 g $23+\frac{2}{10}+\frac{6}{1000}$ $700+20+5+\frac{9}{100}$ $20+9+9+\frac{4}{10}+\frac{1}{100}=29+4\times \frac{1}{10}+1\times \frac{1}{100}$ Weight of sugar purchased by Ravi $=29+0.4+0.01=29.41$ $137+\frac{5}{100}$ $=137+0\times \frac{1}{10}+5\times \frac{1}{100}=137+0+0.05=137.05$ $\frac{7}{10}+\frac{6}{100}+\frac{4}{1000}$ Weight of flour purchased by Ravi = 10 kg 850 g = 10 kg + 850 g $=7\times \frac{1}{10}+6\times \frac{1}{100}+4\times \frac{1}{1000}$ $=0.7+0.06+0.004=0.764$ $23+\frac{2}{10}+\frac{6}{1000}=23+2\times \frac{1}{10}+0\times \frac{1}{100}+6\times \frac{1}{1000}$ $=23+0.2+0+0.006=23.206$ Total weight of his purchases $700+20+5+\frac{9}{100}$ Hence, total weight of all his purchases is 18.270 kg.


text:
# pic16f628a successfully programmed but not working

I want to blink led with pic16f628a using pickit2 I generated the hex file and successfully write it, according to code, RB are input, but when I put led between RB0,1,2,3.. and ground it turn on. all the pin turn on the led, I'm using 5 volt output

code :

#include<htc.h>

// Config word
__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_ON & CP_OFF);

// Define LED pin
#define LED  RA1

#define _XTAL_FREQ   8000000

void main()
{
TRISA1 = 0;                // Make RA1 pin output
TRISB = 1;
LED    = 0;                // Make RA1 low

while(1)
{
__delay_ms(500);       // Half sec delay
LED = 0;               // LED off
__delay_ms(500);       // Half sec delay
LED = 1;               // LED on
}
}

scheme :

• has CMCON register any thing to do with that????? – mikmik Jul 15 '14 at 15:29

You're setting A0 to be an output, then you're blinking A1. Which is it? A0 or A1? Make your mind up, and then make them both the same.

Another thing I notice on your schematic. You're setting the oscillator to be HS, yet I'm not seeing ant crystal or loading caps on your schematic. Did you just omit them from that drawing, or do they truly not exist?

The same goes for the (missing) obligatory decoupling capacitor on the power pin.

• im making A1 output not A0 where do you see A0, and why RB0 can turn on the led – mikmik Jul 15 '14 at 15:14
• LED is defined as RA1 (which is pin 18 as per your circuit diagram) but "Make RA0 pin output" is in your code comments... – carveone Jul 15 '14 at 15:16
• no matter what put in comment, but u see that I put RA1 output, – mikmik Jul 15 '14 at 15:19
• TRISA0 = 0; sets pin A0 to be an output! – Majenko Jul 15 '14 at 15:23
• It does, but you have to tell it to use it. You're telling it to use an external crystal, so although it programs, it doesn't actually do anything. Add a crystal or set it to use the internal RC oscillator. – Majenko Jul 15 '14 at 15:33
1. As Majenko pointed out, you set up the configuration bits to use a high-speed crystal (FOSC_HS), yet you did not add a crystal to your schematic. Note that "#define _XTAL_FREQ" does not actually define the oscillator speed of the microcontroller. It is simply a constant value the delay functions use to calculate delay times. You must either add a crystal or just use the internal oscillator (much simpler). If you don't know how to do that, just ask.

2. You must put a pull-up resistor to VDD on the MCLR pin. A 10k resistor is typical. If you leave MCLR floating, the chip will either never run or it will randomly reset. You can avoid the pull-up resistor if you clear the MCLRE bit in the configuration settings, but I wouldn't necessarily recommend that right now.

• yes I searched all the web to find how to set internal oscillator for this pic16f628a in this program, I found nothing helpful, any help?? – mikmik Jul 15 '14 at 17:43
• Best place to find these answers is always in the datasheet. The datasheet might seem a little daunting at first, but I promise it's very useful once you read it. Anyway, the oscillator for this particular PIC is determined by the configuration bits. Right now you have "FOSC_HS" in your code. HS stands for high-speed crystal (or resonator). You compiler will have another macro defined for the internal oscillator. Probably something like "INTOSC" or similar. – Dan Laks Jul 16 '14 at 6:00
• i configured the internal oscillator electronics.stackexchange.com/questions/121441/… , and put resistor between VDD and MCLR as u said, but still nothing work, I successfully programmed the chip with pickit2 and then I just set like the scheme above, the led is not on?? – mikmik Jul 16 '14 at 11:36
• Looks like this chip has a PGM pin, which is used for low-voltage programming (LVP). I believe LVP is enabled by default in the CONFIG register, so you have to ground the PGM pin to prevent the chip from holding in programming mode. Connect the PGM pin to ground and see if that helps. – Dan Laks Jul 16 '14 at 15:55

If this is one of your first projects with 16f628a always turn off comparator(CMCON =0x07) and/or use PortB first. Also attach few leds on different pins and change values on whole port like PortB =0x00 and PortB=0xFF that way even if there is some conflict you didnt know about some pin will flash some led. That way you can learn on what you should pay attention in the future. You dont need to be worried about MCLR just use configuration word that turns it off and you will be fine. I never used any resistor on that pin ever and never had problems.

I just noticed in your picture of the pickit2 programmer that it wrote successfully, but I think something is wrong with your hex code — it seems to have data only in the first location. Make sure you check that as well.


text:
# Differential structures and K-homology groups

What is an example of a (compact) manifold, which has two non-equivalent differential structures such that the K-homology groups are non-isomorphic? If no such example exists, i.e. "K-homology does not see the differential structure", then can someone give a heuristic explanation of why an object (originally at least) defined in terms of pseudo-differential operators does not depend on a choice of differential structure.

• Well, de Rham cohomology is also defined in terms of smooth stuff and doesn't end up depending on it. Oct 6 '15 at 3:44

K-homology is usually not defined in terms of pseudodifferential operators. In fact, I don't even know which definition you mean.

K-homology is either defined as the dual of K-theory (i.e., it is defined as the generalized homology theory associated to the K-theory spectrum), which means that it only depends on the weak homotopy type of the space.

Or it is defined using Fredholm modules over the C*-algebra $C_0(X)$ of continuous functions vanishing at infinity, which means that a priori it depends only on the homeomorphism type of the space.

Or it is defined using a geometric picture (cycles are compact spin$^c$-manifolds with a Hermitian vector bundle and a continuous map to the space).

All three definitions can be applied to topological spaces, i.e., do not need a smooth structure on the space or the space being a manifold at all. All three definitions coincide for finite complexes.

Even though the $K$-homology groups themselves do not depend on the smooth structure there are classes in $K$-theory, which can tell apart some of the smooth structures:
Let $\mathcal{S}(M)$ denote the group of isotopy classes of smooth structures on $M$ and $M_{\alpha}$ denote $M$ equipped with the smooth structure $\alpha$. The identity map induces a map on the corresponding sphere bundles $\varphi \colon SM_{\alpha} \to SM$. There is a unit $u \in K^0(SM)$, such that $\varphi_*([SM_{\alpha}]) = u \cap [SM]$, where $[SM] \in K_1(SM)$ denotes the fundamental class of the spin$^c$-manifold $SM$ in $K$-homology. The class $u$ descends to a unit $\theta(\alpha) \in K^0(M)$, such that $\pi^*(\theta(\alpha)) = u$, where $\pi \colon SM \to M$ is the bundle projection. It was proven by Jerome Kaminker that $\theta \colon \mathcal{S}(M) \to K^0(M)$ is a homomorphism and that there are smooth manifolds $M$ for which $\theta$ is nontrivial (see "Pseudo-differential Operators and differential structures").
This implies for example that the algebra of order $0$ pseudodifferential operators $\mathcal{P}_M$ depends on the smooth structure. To see this, note that it fits into an exact sequence $$0 \to \mathcal{K} \to \mathcal{P}_M \to C(SM) \to 0$$ (where $\mathcal{K}$ are the compact operators) giving an element in $K_1(SM)$ by BDF-theory. This class agrees with the fundamental class $[SM] \in K_1(SM)$.


text:
Survival analysis

Survival analysis is a branch of statistics for analyzing the expected duration of time until one or more events happen, such as death in biological organisms and failure in mechanical systems. This topic is called reliability theory or reliability analysis in engineering, duration analysis or duration modelling in economics, and event history analysis in sociology. Survival analysis attempts to answer questions such as: what is the proportion of a population which will survive past a certain time? Of those that survive, at what rate will they die or fail? Can multiple causes of death or failure be taken into account? How do particular circumstances or characteristics increase or decrease the probability of survival?

To answer such questions, it is necessary to define "lifetime". In the case of biological survival, death is unambiguous, but for mechanical reliability, failure may not be well-defined, for there may well be mechanical systems in which failure is partial, a matter of degree, or not otherwise localized in time. Even in biological problems, some events (for example, heart attack or other organ failure) may have the same ambiguity. The theory outlined below assumes well-defined events at specific times; other cases may be better treated by models which explicitly account for ambiguous events.

More generally, survival analysis involves the modelling of time to event data; in this context, death or failure is considered an "event" in the survival analysis literature – traditionally only a single event occurs for each subject, after which the organism or mechanism is dead or broken. Recurring event or repeated event models relax that assumption. The study of recurring events is relevant in systems reliability, and in many areas of social sciences and medical research.

Introduction to survival analysis

Survival analysis is used in several ways:

• To describe the survival times of members of a group
• To compare the survival times of two or more groups
• To describe the effect of categorical or quantitative variables on survival

Definitions of common terms in survival analysis

The following terms are commonly used in survival analyses.

• Event: Death, disease occurrence, disease recurrence, recovery, or other experience of interest
• Time: The time from the beginning of an observation period (such as surgery or beginning treatment) to (i) an event, or (ii) end of the study, or (iii) loss of contact or withdrawal from the study.
• Censoring / Censored observation: If a subject does not have an event during the observation time, they are described as censored. The subject is censored in the sense that nothing is observed or known about that subject after the time of censoring. A censored subject may or may not have an event after the end of observation time.
• Survival function S(t): The probability that a subject survives longer than time t.

Example: Acute Myelogenous Leukemia survival data

This example uses the Acute Myelogenous Leukemia survival data set "aml" from the "survival" package in R. The data set is from Miller (1997) [1] The question at the time was whether the standard course of chemotherapy should be extended ('maintained') for additional cycles.

The aml data set sorted by survival time is shown in the box.

aml data set sorted by survival time
• Time is indicated by the variable "time", which is the survival or censoring time
• Event (recurrence of aml cancer) is indicated by the variable "status". 0 = no event (censored), 1 = event (recurrence)
• Treatment group: the variable "x" indicates if maintenance chemotherapy was given

The last observation (11), at 161 weeks, is censored. Censoring indicates that the patient did not have an event (no recurrence of aml cancer). Another subject, observation 3, was censored at 13 weeks (indicated by status=0). This subject was only in the study for 13 weeks, and the aml cancer did not recur during those 13 weeks. It is possible that this patient was enrolled near the end of the study, so that they could only be observed for 13 weeks. It is also possible that the patient was enrolled early in the study, but was lost to follow up or withdrew from the study. The table shows that other subjects were censored at 16, 28, and 45 weeks (observations 17, 6, and 9 with status=0). The remaining subjects all experienced events (recurrence of aml cancer) while in the study. The question of interest is whether recurrence occurs later in maintained patients than in non-maintained patients.

Kaplan-Meier plot for the aml data

The Survival function S(t), is the probability that a subject survives longer than time t. S(t) is theoretically a smooth curve, but it is usually estimated using the Kaplan-Meier(KM) curve. The graph shows the KM plot for the aml data.

Kaplan-Meier plot of AML survival data set

The KM plot is interpreted as follows.

• The x-axis is time, from zero (when observation began) to the last observed time point.
• The y axis is the proportion of subjects surviving. At time zero, 100% of the subjects are alive without an event.
• The solid line (similar to a staircase) shows the events.
• A vertical drop indicates an event. In the aml table shown above, two subjects had events at 5 weeks, two had events at 8 weeks, one had an event at 9 weeks, and so on. These events at 5 weeks, 8 weeks and so on are indicated by the vertical drops in the KM plot at those time points.
• At the far right end of the KM plot there is a tick mark at 161 weeks. The vertical tick mark indicates that a patient was censored at this time. In the aml data table five subjects were censored, at 13, 16, 28, 45 and 161 weeks. There are five tick marks in the KM plot, corresponding to these censored observations.

Life table for the aml data

A life table summarizes survival data in terms of the number of events and the proportion surviving at each event time point. The life table for the aml data, created using the R software, is shown.

Life table for the aml data

The life table summarizes the events and the proportion surviving at each event time point. The columns in the life table have the following interpretation.

• time gives the time points at which events occur.
• n.risk is the number of subjects at risk immediately before the time point, t. Being "at risk" means that the subject has not had an event before time t, and is not censored before or at time t.
• n.event is the number of subjects who have events at time t.
• survival is the proportion surviving, as determined using the Kaplan-Meier product-limit estimate.
• std.err is the standard error of the estimated survival. The standard error of the Kaplan-Meier product-limit estimate at time it is calculated using Greenwood’s formula, and depends on the number at risk (n.risk in the table), the number of deaths (n.event in the table) and the proportion surviving (survival in the table).
• lower 95% CI and upper 95% CI are the lower and upper 95% confidence bounds for the proportion surviving.

Log-rank test: Testing for differences in survival in the aml data

The logrank test compares the survival times of two or more groups. This example uses a logrank test for a difference in survival in the maintained versus non-maintained treatment groups in the aml data. The graph shows KM plots for the aml data broken out by treatment group, which is indicated by the variable "x" in the data.

Kaplan-Meier graph by treatment group in aml

The null hypothesis for a logrank test is that the groups have the same survival. The expected number of subjects surviving at each time point in each is adjusted for the number of subjects at risk in the groups at each event time. The logrank test determines if the observed number of events in each group is significantly different from the expected number. The formal test is based on a chi-squared statistic. When the log rank statistic is large, it is evidence for a difference in the survival times between the groups. The log rank statistic approximately has a chi-squared distribution with one degree of freedom, and the p-value is calculated using the chi-squared distribution.

The log rank test for difference in survival gives a p-value of p=0.0653, indicating that the treatment groups do not differ significantly in survival, assuming an alpha level of 0.05. The sample size of 23 subjects is modest, so there is little power to detect differences between the treatment groups. The chi-squared test is based on asymptotic approximation, so the p-value should be regarded with caution for small sample sizes.

Cox proportional hazards (PH) regression analysis

Kaplan-Meier curves and logrank tests are most useful when the predictor variable is categorical (e.g., drug vs. placebo), or takes a small number of values (e.g., drug doses 0, 20, 50, and 100 mg/day) that can be treated as categorical. The logrank test and K-M curves don’t work easily with quantitative predictors such as gene expression, white blood count, or age. For quantitative predictor variables, an alternative method is Cox proportional hazards regression analysis. Cox PH models work also with categorical predictor variables, which are encoded as {0,1} indicator or dummy variables. The logrank test is a special case of a Cox PH analysis, and can be performed using Cox PH software.

Example: Cox proportional hazards regression analysis for melanoma

This example uses the melanoma data set from Dalgaard Chapter 12. [2]

Data are in the R package ISwR. The Cox proportional hazards regression using R gives the results shown in the box.

Cox proportional hazards regression output for melanoma data. Predictor variable is sex 1: female, 2: male.

The Cox regression results are interpreted as follows.

• Sex is encoded as a numeric vector. 1: female, 2: male. The R summary for the cox model gives the hazard ratio (HR) for the second group relative to the first group, that is, male versus female.
• coef= 0.662 is the estimated logarithm of the hazard ratio for males versus females.
• exp(coef) = 1.94 = exp(0.662) The log of the hazard ratio (coef= 0.662) is transformed to the hazard ratio using exp(coef). The summary for the Cox model gives the hazard ratio for the second group relative to the first group, that is, male versus female. The estimated hazard ratio = 1.94 indicates that males have higher risk of death (lower survival rates) than females, in these data.
• se(coef) = 0.265 is the standard error of the log hazard ratio.
• z = 2.5 = coef/se(coef) = 0.662/0.265. Dividing the coef by its standard error gives the z score:
• p=0.013. The p-value corresponding to z=2.5 for sex is p=0.013, indicating that there is a significant difference in survival as a function of sex.

The summary output also gives upper and lower 95% confidence intervals for the hazard ratio, lower 95% bound = 1.15, upper 95% bound = 3.26.

Finally, the output gives p-values for three alternative tests for overall significance of the model:

• Likelihood ratio test= 6.15 on 1 df, p=0.0131
• Wald test = 6.24 on 1 df, p=0.0125
• Score (logrank) test = 6.47 on 1 df, p=0.0110

These three methods are asymptotically equivalent. For large enough N, they will give similar results. For small N, they may differ somewhat. The last row, "Score (logrank) test" is the result for the logrank test, with p=0.011, the same result as the logrank test, because the logrank test is a special case of a Cox PH regression. The Likelihood ratio test has better behavior for small sample sizes, so it is generally preferred.

Cox model using a covariate in the melanoma data

The Cox model extends the logrank test by allowing the inclusion of additional covariates. This example use the melanom data set where the predictor variables include a continuous covariate, the thickness of the tumor (variable name = “thick”)

Histograms of melanoma tumor thickness

In the histograms, the thickness values don’t look normally distributed. Regression models, including the Cox model, generally give more reliable results with normally-distributed variables. For this example use a log transform. The log of the thickness of the tumor looks to be more normally distributed, so the Cox models will use log thickness. The Cox PH analysis gives the results in the box.

Cox PH output for melanoma data set with covariate log tumor thickness

The p-value for all three overall tests (likelihood, Wald, and score) are significant, indicating that the model is significant. The p-value for log(thick) is 6.9e-07, with a hazard ratio HR = exp(coef) = 2.18, indicating a strong relationship between the thickness of the tumor and increased risk of death.

By contrast, the p-value for sex is now p=0.088. The hazard ratio HR = exp(coef) = 1.58, with a 95% confidence interval of 0.934 to 2.68. Because the confidence interval for HR includes 1, these results indicate that sex makes a smaller contribution to the difference in the HR after controlling for the thickness of the tumor, and only trend toward significance. Examination of graphs of log(thickness) by sex and a t-test of log(thickness) by sex both indicate that there is a significant difference between men and women in the thickness of the tumor when they first see the clinician.

The Cox model assumes that the hazards are proportional. The proportional hazard assumption may be tested using the R function cox.zph(). A p-value is less than 0.05 indicates that the hazards are not proportional. For the melanoma data, p=0.222, indicating that the hazards are, at least approximately, proportional. Additional tests and graphs for examining a Cox model are described in the textbooks cited.

Extensions to Cox models

Cox models can be extended to deal with variations on the simple analysis.

• Stratification. The subjects can be divided into strata, where subjects within a stratum are expected to be relatively more similar to each other than to randomly chosen subjects from other strata. The regression parameters are assumed to be the same across the strata, but a different baseline hazard may exist for each stratum. Stratification is useful for analyses using matched subjects, for dealing with patient subsets, such as different clinics, and for dealing with violations of the proportional hazard assumption.
• Time-varying covariates. Some variables, such as gender and treatment group, generally stay the same in a clinical trial. Other clinical variables, such as serum protein levels or dose of concomitant medications may change over the course of a study. Cox models may be extended for such time-varying covariates.

Tree-structured survival models

The Cox PH regression model is a linear model. It is similar to linear regression and logistic regression. Specifically, these methods assume that a single line, curve, plane, or surface is sufficient to separate groups (alive, dead) or to estimate a quantitative response (survival time).

In some cases alternative partitions give more accurate classification or quantitative estimates. One set of alternative methods are tree-structured survival models, including survival random forests. Tree-structured survival models may give more accurate predictions than Cox models. Examining both types of models for a given data set is a reasonable strategy.

Example survival tree analysis

This example of a survival tree analysis uses the R package "rpart". The example is based on 146 stage C prostate cancer patients in the data set stagec in rpart. Rpart and the stagec example are described in the PDF document "An Introduction to Recursive Partitioning Using the RPART Routines". Terry M. Therneau, Elizabeth J. Atkinson, Mayo Foundation. September 3, 1997.

The variables in stagec are:

• pgtime time to progression, or last follow-up free of progression
• pgstat status at last follow-up (1=progressed, 0=censored)
• age age at diagnosis
• eet early endocrine therapy (1=no, 0=yes)
• ploidy diploid/tetraploid/aneuploid DNA pattern
• g2 % of cells in G2 phase

The survival tree produced by the analysis is shown in the figure.

Survival tree for prostate cancer data set

Each branch in the tree indicates a split on the value of a variable. For example, the root of the tree splits subjects with grade < 2.5 versus subjects with grade 2.5 or greater. The terminal nodes indicate the number of subjects in the node, the number of subjects who have events, and the relative event rate compared to the root. In the node on the far left, the values 1/33 indicate that 1 of the 33 subjects in the node had an event, and that the relative event rate is 0.122. In the node on the far right bottom, the values 11/15 indicate that 11 of 15 subjects in the node had an event, and the relative event rate is 2.7.

Survival random forests

An alternative to building a single survival tree is to build many survival trees, where each tree is constructed using a sample of the data, and average the trees to predict survival. This is the method underlying the survival random forest models. Survival random forest analysis is available in the R package "randomForestSRC".

The randomForestSRC package includes an example survival random forest analysis using the data set pbc. This data is from the Mayo Clinic Primary Biliary Cirrhosis (PBC) trial of the liver conducted between 1974 and 1984. In the example, the random forest survival model gives more accurate predictions of survival than the Cox PH model. The prediction errors are estimated by bootstrap re-sampling.

General formulation

Survival function

The object of primary interest is the survival function, conventionally denoted S, which is defined as

${\displaystyle S(t)=\Pr(T>t)}$

where t is some time, T is a random variable denoting the time of death, and "Pr" stands for probability. That is, the survival function is the probability that the time of death is later than some specified time t. The survival function is also called the survivor function or survivorship function in problems of biological survival, and the reliability function in mechanical survival problems. In the latter case, the reliability function is denoted R(t).

Usually one assumes S(0) = 1, although it could be less than 1 if there is the possibility of immediate death or failure.

The survival function must be non-increasing: S(u) ≤ S(t) if ut. This property follows directly because T>u implies T>t. This reflects the notion that survival to a later age is only possible if all younger ages are attained. Given this property, the lifetime distribution function and event density (F and f below) are well-defined.

The survival function is usually assumed to approach zero as age increases without bound, i.e., S(t) → 0 as t → ∞, although the limit could be greater than zero if eternal life is possible. For instance, we could apply survival analysis to a mixture of stable and unstable carbon isotopes; unstable isotopes would decay sooner or later, but the stable isotopes would last indefinitely.

Lifetime distribution function and event density

Related quantities are defined in terms of the survival function.

The lifetime distribution function, conventionally denoted F, is defined as the complement of the survival function,

${\displaystyle F(t)=\Pr(T\leq t)=1-S(t).}$

If F is differentiable then the derivative, which is the density function of the lifetime distribution, is conventionally denoted f,

${\displaystyle f(t)=F'(t)={\frac {d}{dt}}F(t).}$

The function f is sometimes called the event density; it is the rate of death or failure events per unit time.

The survival function can be expressed in terms of probability distribution and probability density functions

${\displaystyle S(t)=\Pr(T>t)=\int _{t}^{\infty }f(u)\,du=1-F(t).}$

Similarly, a survival event density function can be defined as

${\displaystyle s(t)=S'(t)={\frac {d}{dt}}S(t)={\frac {d}{dt}}\int _{t}^{\infty }f(u)\,du={\frac {d}{dt}}[1-F(t)]=-f(t).}$

In other fields, such as statistical physics, the survival event density function is known as the first passage time density.

Hazard function and cumulative hazard function

The hazard function, conventionally denoted ${\displaystyle \lambda }$, is defined as the event rate at time t conditional on survival until time t or later (that is, Tt). Suppose that an item has survived for a time t and we desire the probability that it will not survive for an additional time dt:

${\displaystyle \lambda (t)=\lim _{dt\rightarrow 0}{\frac {\Pr(t\leq T

Force of mortality is a synonym of hazard function which is used particularly in demography and actuarial science, where it is denoted by ${\displaystyle \mu }$. The term hazard rate is another synonym.

The force of mortality of the survival function is defined as ${\displaystyle \mu (x)=-{d \over dx}\ln(S(x))={\frac {f(x)}{S(x)}}}$

The force of mortality is also called the force of failure. It is the probability density function of the distribution of mortality.

In actuarial science, the hazard rate is the rate of death for lives aged x. For a life aged x, the force of mortality t years later is the force of mortality for a (x + t)–year old. The hazard rate is also called the failure rate. Hazard rate and failure rate are names used in reliability theory.

Any function h is a hazard function if and only if it satisfies the following properties:

1. ${\displaystyle h(x)\geq 0\forall (x\geq 0)}$ ,
2. ${\displaystyle \int _{0}^{\infty }h(x)dx=\infty }$ .

In fact, the hazard rate is usually more informative about the underlying mechanism of failure than the other representatives of a lifetime distribution.

The hazard function must be non-negative, λ(t) ≥ 0, and its integral over ${\displaystyle [0,\infty ]}$ must be infinite, but is not otherwise constrained; it may be increasing or decreasing, non-monotonic, or discontinuous. An example is the bathtub curve hazard function, which is large for small values of t, decreasing to some minimum, and thereafter increasing again; this can model the property of some mechanical systems to either fail soon after operation, or much later, as the system ages.

The hazard function can alternatively be represented in terms of the cumulative hazard function, conventionally denoted ${\displaystyle \Lambda }$:

${\displaystyle \,\Lambda (t)=-\log S(t)}$

so transposing signs and exponentiating

${\displaystyle \,S(t)=\exp(-\Lambda (t))}$

or differentiating (with the chain rule)

${\displaystyle {\frac {d}{dt}}\Lambda (t)=-{\frac {S'(t)}{S(t)}}=\lambda (t).}$

The name "cumulative hazard function" is derived from the fact that

${\displaystyle \Lambda (t)=\int _{0}^{t}\lambda (u)\,du}$

which is the "accumulation" of the hazard over time.

From the definition of ${\displaystyle \Lambda (t)}$, we see that it increases without bound as t tends to infinity (assuming that S(t) tends to zero). This implies that ${\displaystyle \lambda (t)}$ must not decrease too quickly, since, by definition, the cumulative hazard has to diverge. For example, ${\displaystyle \exp(-t)}$ is not the hazard function of any survival distribution, because its integral converges to 1.

Quantities derived from the survival distribution

Future lifetime at a given time ${\displaystyle t_{0}}$ is the time remaining until death, given survival to age ${\displaystyle t_{0}}$. Thus, it is ${\displaystyle T-t_{0}}$ in the present notation. The expected future lifetime is the expected value of future lifetime. The probability of death at or before age ${\displaystyle t_{0}+t}$, given survival until age ${\displaystyle t_{0}}$, is just

${\displaystyle P(T\leq t_{0}+t\mid T>t_{0})={\frac {P(t_{0}t_{0})}}={\frac {F(t_{0}+t)-F(t_{0})}{S(t_{0})}}.}$

Therefore, the probability density of future lifetime is

${\displaystyle {\frac {d}{dt}}{\frac {F(t_{0}+t)-F(t_{0})}{S(t_{0})}}={\frac {f(t_{0}+t)}{S(t_{0})}}}$

and the expected future lifetime is

${\displaystyle {\frac {1}{S(t_{0})}}\int _{0}^{\infty }t\,f(t_{0}+t)\,dt={\frac {1}{S(t_{0})}}\int _{t_{0}}^{\infty }S(t)\,dt,}$

where the second expression is obtained using integration by parts.

For ${\displaystyle t_{0}=0}$, that is, at birth, this reduces to the expected lifetime.

In reliability problems, the expected lifetime is called the mean time to failure, and the expected future lifetime is called the mean residual lifetime.

As the probability of an individual surviving until age t or later is S(t), by definition, the expected number of survivors at age t out of an initial population of n newborns is n × S(t), assuming the same survival function for all individuals. Thus the expected proportion of survivors is S(t). If the survival of different individuals is independent, the number of survivors at age t has a binomial distribution with parameters n and S(t), and the variance of the proportion of survivors is S(t) × (1-S(t))/n.

The age at which a specified proportion of survivors remain can be found by solving the equation S(t) = q for t, where q is the quantile in question. Typically one is interested in the median lifetime, for which q = 1/2, or other quantiles such as q = 0.90 or q = 0.99.

One can also make more complex inferences from the survival distribution. In mechanical reliability problems, one can bring cost (or, more generally, utility) into consideration, and thus solve problems concerning repair or replacement. This leads to the study of renewal theory and reliability theory of ageing and longevity.

Censoring

Censoring is a form of missing data problem which is common in survival analysis. Ideally, both the birth and death dates of a subject are known, in which case the lifetime is known.

If it is known only that the date of death is after some date, this is called right censoring. Right censoring will occur for those subjects whose birth date is known but who are still alive when they are lost to follow-up or when the study ends.

If a subject's lifetime is known to be less than a certain duration, the lifetime is said to be left-censored. Left censoring is usually applied when subjects in a study already have exhibited the event in question at the start of the study but information about when they first reached the event is unclear.[3]

It may also happen that subjects with a lifetime less than some threshold may not be observed at all: this is called truncation. Note that truncation is different from left censoring, since for a left censored datum, we know the subject exists, but for a truncated datum, we may be completely unaware of the subject. Truncation is also common. In a so-called delayed entry study, subjects are not observed at all until they have reached a certain age. For example, people may not be observed until they have reached the age to enter school. Any deceased subjects in the pre-school age group would be unknown. Left-truncated data are common in actuarial work for life insurance and pensions.[4]

We generally encounter right-censored data. Left-censored data can occur when a person's survival time becomes incomplete on the left side of the follow-up period for the person. For example, in an epidemiological example, we may monitor a patient for an infectious disorder starting from the time when he or she is tested positive for the infection. Although we may know the right-hand side of the duration of interest, we may never know the exact time of exposure to the infectious agent.[5]

Fitting parameters to data

Survival models can be usefully viewed as ordinary regression models in which the response variable is time. However, computing the likelihood function (needed for fitting parameters or making other kinds of inferences) is complicated by the censoring. The likelihood function for a survival model, in the presence of censored data, is formulated as follows. By definition the likelihood function is the conditional probability of the data given the parameters of the model. It is customary to assume that the data are independent given the parameters. Then the likelihood function is the product of the likelihood of each datum. It is convenient to partition the data into four categories: uncensored, left censored, right censored, and interval censored. These are denoted "unc.", "l.c.", "r.c.", and "i.c." in the equation below.

${\displaystyle L(\theta )=\prod _{T_{i}\in unc.}\Pr(T=T_{i}\mid \theta )\prod _{i\in l.c.}\Pr(TT_{i}\mid \theta )\prod _{i\in i.c.}\Pr(T_{i,l}

For uncensored data, with ${\displaystyle T_{i}}$ equal to the age at death, we have

${\displaystyle \Pr(T=T_{i}\mid \theta )=f(T_{i}\mid \theta ).}$

For left-censored data, such that the age at death is known to be less than ${\displaystyle T_{i}}$, we have

${\displaystyle \Pr(T

For right-censored data, such that the age at death is known to be greater than ${\displaystyle T_{i}}$, we have

${\displaystyle \Pr(T>T_{i}\mid \theta )=1-F(T_{i}\mid \theta )=S(T_{i}\mid \theta ).}$

For an interval censored datum, such that the age at death is known to be less than ${\displaystyle T_{i,r}}$ and greater than ${\displaystyle T_{i,l}}$, we have

${\displaystyle \Pr(T_{i,l}

An important application where interval-censored data arises is current status data, where an event ${\displaystyle T_{i}}$ is known not to have occurred before an observation time and to have occurred before the next observation time.

Non-parametric estimation

The Kaplan-Meier estimator can be used to estimate the survival function. The Nelson–Aalen estimator can be used to provide a non-parametric estimate of the cumulative hazard rate function.

Computer software for survival analysis

The UCLA website http://www.ats.ucla.edu/stat/ has numerous examples of statistical analyses using SAS, R, SPSS and STATA, including survival analyses.

The textbook by Kleinbaum [6] has examples of survival analyses using SAS, R, and other packages. The textbooks by Brostrom [7] by Dalgaard [2] and by Tableman and Kim [8] give examples of survival analyses using R (or using S, and which run in R).

Survival analysis in R

Analyses using the R package "survival"

The examples above use the R package "survival", except for the tree analyses described below.

# Install and load the survival package

install.packages("survival")
library(survival)

# sort the aml data by time
aml=aml[order(aml$time),] aml # Create graph of length of time that each subject was in the study with(aml, plot(time, type="h")) # Create the life table survival object for aml aml.survfit = survfit(Surv(time, status == 1) ~ 1, data=aml) # Plot the Kaplan-Meier curve for aml. Don't print the confidence interval. plot(aml.survfit, xlab = "Time (weeks)", ylab="Proportion surviving", conf.int=FALSE, main="Survival in AML") # Create the life table for the aml data # The functions survfit() and Surv() create a life table survival object. # The summary() function displays the life table # The life table object is passed to the plot() function to create the KM plot. aml.survfit = survfit(Surv(time, status == 1) ~ 1, data=aml) summary(aml.survfit) # Kaplan-Meier curve for aml with the confidence bounds. # By default, R includes the confidence interval. plot(aml.survfit, xlab = "Time", ylab="Proportion surviving") # Create aml life tables and KM plots broken out by treatment (x, "Maintained" vs. "Not maintained") surv.by.aml.rx = survfit(Surv(time, status == 1) ~ x, data = aml) summary(surv.by.aml.rx) # Plot KM plot(surv.by.aml.rx, xlab = "Time", ylab="Survival",col=c("black", "red"), lty = 1:2, main="Kaplan-Meier Survival vs. Maintenance in AML") # Add legend legend(100, .6, c("Maintained", "Not maintained"), lty = 1:2, col=c("black", "red")) # Perform the log rank test using the R function survdiff(). surv.diff.aml= survdiff(Surv(time, status == 1) ~ x, data=aml) surv.diff.aml # Cox Proportional Hazards regression # melanoma data set from ISwR package, described in Dalgaard Chapter 12. # install the ISwR package and load the library into R. # The ISwR package currently only appears to be available for older versions of R install.packages("ISwR") library(ISwR) help(melanom) # description of the melanoma data # The log rank test is a special case of the cox proportional hazard regression analysis. # The same analysis can be performed using the R function coxph(). # melanoma example using a log-rank test. surv.diff.sex = survdiff(Surv(days, status == 1) ~ sex, data = melanom) surv.diff.sex # melanoma analysis using Cox proportional hazards regression coxph.sex = coxph(Surv(days, status == 1) ~ sex, data = melanom) summary(coxph.sex) # melanoma Cox analysis including covariate ulcer thickness # Plot the thickness values and log(thickness) hist(melanom$thick)

hist(log(melanom$thick)) # The Cox PH analysis of melanoma data including covariate log(thick) coxph.sex.thick = coxph(Surv(days, status == 1) ~ sex + log(thick), data = melanom) summary(coxph.sex.thick) # Examine thickness by sex boxplot(log(melanom$thick) ~ melanom$sex) t.test(log(melanom$thick) ~ melanom\$sex)

# Test of proportional hazards assumption
coxph.sex = coxph(Surv(days, status == 1) ~ sex, data = melanom)

cox.zph(coxph.sex)

Survival tree analysis using the rpart package

Rpart and the example are described in the PDF document "An Introduction to Recursive Partitioning Using the RPART Routines". Terry M. Therneau, Elizabeth J. Atkinson, Mayo Foundation. September 3, 1997.

install.packages("rpart")
library(rpart)

# Pass a survival object from Surv() to the function rpart() to perform the analysis.
fit <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2 + grade + gleason + ploidy, data=stagec)

# plot the resulting tree

plot(fit, uniform=T, branch=.4, compress=T)
text(fit, use.n=T)
# The print() function provides details of the tree not shown above
print(fit)

Survival random forest models using the randomForestSRC package

Note that the R package randomSurvivalForest has been replaced by the package randomForestSRC, "Random Forests for Survival, Regression and Classification". See the randomForestSRC package for documentation on running the example.

References

1. ^ Miller, Rupert G. (1997), Survival analysis, John Wiley & Sons, ISBN 0-471-25218-2
2. ^ a b Dalgaard, Peter (2008), Introductory Statistics with R (Second ed.), Springer, ISBN 978-0387790534
3. ^ Darity, William A., Jr., ed. (2008). "Censoring, Left and Right". International Encyclopedia of the Social Sciences. 1 (2nd ed.). Macmillan. pp. 473–474. Retrieved 6 November 2016.
4. ^ Richards, S. J. (2012). "A handbook of parametric survival models for actuarial use". Scandinavian Actuarial Journal. 2012 (4): 233–257. doi:10.1080/03461238.2010.506688.
5. ^ Singh, R.; Mukhopadhyay, K. (2011). "Survival analysis in clinical trials: Basics and must know areas". Perspect Clin Res. 2 (4): 145–148. doi:10.4103/2229-3485.86872.
6. ^ Kleinbaum, David G.; Klein, Mitchel (2012), Survival analysis: A Self-learning text (Third ed.), Springer, ISBN 978-1441966452
7. ^ Brostrom, Göran (2012), Event History Analysis with R (First ed.), Chapman & Hall/CRC, ISBN 978-1439831649
8. ^ Tableman, Mara; Kim, Jong Sung (2003), Survival Analysis Using S (First ed.), Chapman and Hall/CRC, ISBN 978-1584884088


text:
# Disabling Writeback for GALSync Contacts

•
•
•
•
•
•

Last week, I began working with a customer that was experiencing what appeared to be a significant amount of updates to a certain group of objects in the local Active Directory.  These objects were being imported from another forest as contacts, yet found themselves being updated very frequently by the local AAD Connect instance.

Why could this be?

Many organizations need to share contact objects so that users can locate others across organizations.  One of the more common tools to do this is GALSync.

# Introduction

When contacts are synchronized between Active Directory forests and those forests are synchronized to Office 365, one of the things that falls out is the Office 365 stamps a cloud x500 address (x500:o=ExchangeLabs) on objects.  Exchange has been using the x500 address for routing…

Now, that being said, the goal of AAD Connect is to synchronize objects.  The idea of synchronization is that the objects are–you guessed it–synchronous.  They’re the same on both sides.  You put a change in one spot, and it gets replicated to the other spot.

Where this becomes tricky is objects that are being touched by autonomous systems outside of AAD Connect and the local directory service operations.  When it comes to synchronized identity, AAD Connect is synchronizing the local changes you make in your directory up to Azure AD, and then bringing down any of the common write-back attributes (including proxyAddresses), if you selected the Exchange Hybrid checkbox in AAD Connect setup.

AAD Connect does this black magic by maintaining a stateful table of object properties and their current states (as it knows them).  On its sync cycle, it looks at the directory API for changes since the time it last executed and then processes updates for only the objects and specific attributes that have changed.

GALSync also does this same stateful inspection process, capturing changes, on the objects that it is maintaining.  The result? Two directory engines constantly at war with changes the other is making.

When this scenario happens, you’ll frequently see AAD Connect attempting an add operation on the proxyAddresses attribute for contact objects located in the organizational unit that the GALSync operation is writing contacts.

# The Fix

Fortunately, there’s a pretty simple fix to this this–exclude the OU where GALSync objects are stored from being written back.

Things you’ll need:

• the full distinguishedName value of the organizational unit where the GALSync contacts from the remote forest are stored, in the form of OU=GALsync OU,dc=domain,dc=tld.  You can find this by launching Active Directory Users and Computers and looking on the Attribute Editor tab of the properties sheet for the attribute distinguishedName.  Double-click and copy this value.

Here we go!

## Clone the default Out-to-AD Contact Exchange Hybrid rule

In this step, we’re going to duplicate the original AAD connect rule that governs this particular writeback and scope out the GALSync OU.

1. Launch the AAD Connect Synchronization Rules Editor.
2. Under Direction, select Outbound.  Under Connector, select your local AD Domain where the contact objects are stored–NOT the onmicrosoft.com domain.
3. Select the rule Out to AD – Contact Exchange Hybrid and click Edit.
4. Select Yes to disable the original rule and create a new, editable copy.  If you don’t do this, your change will be wiped out during the next AAD Connect upgrade cycle.

5. Edit the Precedence for the rule, making it a lower number than where the original rule exists (you’ll likely need to pick something in the low 100’s or high 90’s).  The precedence value cannot be already in use by an existing rule (either enabled or disabled).  In this example, I’m choosing 95.  Click Next to advance to the Scoping filter page.
7. Select Add clause, and then from the drop-downs select:
Attribute: distinguishedName
Operator: NOTCONTAINS
Value: distinguishedName value for the GALSync OU. Copy and past the DN value exactly as it is in ADUC.
8. Click Save.
9. If prompted, click OK.

What you’ve effectively done is exclude the GALSync OU in your forest from AAD Connect writeback.

## Start a full sync

Finally, you’ll want to run a full AAD Connect cycle to trigger the rules to take effect.  If you didn’t see the prompt above about the next cycle triggering a full sync, you’ll want to do this part manually.

1. Launch an elevated PowerShell prompt.
2. Run:
Start-ADSyncSyncCycle -PolicyType Initial
3. Wait for magic.


text:
# Homework Help: What is the maximum height of the square's center-of-mass?

1. Aug 12, 2014

### hanburger

1. The problem statement, all variables and given/known data

A square shaped block of mass m travels to the right with velocity v on a frctionless surface. The block has side-length 2d. The block hits a very small, immovable obstacle on the floor and starts to tip.

The block has moment of inertia Icm=2/3md^2 about an axis through its center of mass and perpendicular to its face.

Assume the block is travelling slow enough such that it does not tip over. To what maximum height does the block's center-of-mass rise?

Please see included picture below. I also uploaded it to imgur (http://imgur.com/qptv9Iw)

2. Relevant equations

Conservation of Angular Momentum
L_i = L_f
L_i = Iw + mrvsin(theta)

3. The attempt at a solution

I took the axis to be the obstacle on the ground. This gave me an initial angular momentum of L_i = mvd. For the final angular momentum, I have I_square*omega. I was thinking that omega would equal v/h. Since this approach was not correct, I attempted to use conservation of energy, even though I don't think conservation of energy applies in this case because I think the obstacle absorbs some of the energy of the square. I solved for omega using the first approach then plugged it into my conservation of energy equation (setting the gain in gravitational potential energy equal to the square's rotational energy). Still have yet to reach a solution.

This question may be more (or less) complicated than I think but I just can't get it. I'll appreciate any help or tips!

http://imgur.com/qptv9Iw

#### Attached Files:

• ###### SquareAngular.jpg
File size:
31.7 KB
Views:
159
Last edited: Aug 12, 2014
2. Aug 13, 2014

### ehild

You said conservation of angular momentum holds at the collision with the obstacle: mvd=Iω0. Why not use it? What is the moment of inertia with respect to the obstacle? What is the initial angular speed then?

ehild

3. Aug 13, 2014

### Orodruin

Staff Emeritus
Did you account for the fact that the given moment of inertia is for rotations around the center of the square and not around the point the square actually rotates?

4. Aug 13, 2014

### hanburger

Oh yes! Parallel axis theorem.
So Li = mvd.
And Lf = (2/3*m*d2 + m*h20

v=ωr
Would ω0 just be v/d?

5. Aug 13, 2014

### Orodruin

Staff Emeritus
I am uncertain what you mean by Lf. Note that angular momentum is not conserved throughout the rotation due to gravity and normal force providing an unbalanced torque. However, once rotating, energy (potential + kinetic) will be conserved as the force from the ground on the block is not performing any work.

6. Aug 13, 2014

### Orodruin

Staff Emeritus
• Note that the moment of inertia will be fixed and not depend on h. What is the distance between the center of mass and the rotational axis?
• The initial angular momentum before impact is mvd as you say. What is the angular momentum right after impact?
• Given the above, what is the rotational energy right after impact?
• What is the rotational energy at the highest point and what is the potential energy at the highest point? What conclusion do you draw from this?

7. Aug 13, 2014

### hanburger

Thank you for your tips! I'm trying to apply them, as follows.

Okay so the square is moving with angular momentum mvd. I'm confused as to the time frame. Because right when it hits the obstacle, it stops. So I would say that right when it hits the obstacle, its angular momentum is still mvd, but since it stops, that is not correct. Right after impact, I think its angular momentum is Iω, but as you pointed out, this is not conserved through the rotation.

When it begins to rotate, the square's initial translational kinetic energy 0.5mv2 is transferred into rotational energy and gravitational kinetic energy, 0.5Iω2 + mgh?
0.5mv2 = 0.5Iω2 + mgh, where I=(2/3)md2

8. Aug 13, 2014

### Nathanael

It stops moving horizontally, but then it starts rotating right? So why do you say that is not correct?

You can't say that because there is a collision. Energy is surely (or at least possibly) lost in the collisioin, right?

You can only use conservation of energy after the collision (to relate Gravitational-PE and Rotational-KE)

9. Aug 13, 2014

### hanburger

Before the collision, angular momentum is mvd. When the collision happens, angular momentum is Iω. And after the collision, rotational energy gets transferred into gravitational potential energy 0.5Iω2 = mg(h-d)?

So angular momentum is conserved before and during collision --> mvd=Iω
And energy is conserved after collision --> 0.5Iω2 = mg(h-d)

10. Aug 13, 2014

### Nathanael

Right. By virtue of the location you chose the rotation axis to be, there is no torque on the box, and so mvd=Iω

As Orodruin pointed out, you'll have to be careful to use the correct rotational inertia.

11. Aug 13, 2014

### ehild

Initially the square slips on the horizontal surface, and its translational velocity is v. With respect to the obstacle, the angular momentum is mvd.

When it hits the obstacle, the square stops its translational motion, but starts to rotate about the axis through the obstacle. At that instant, the square is still upright, its centre is still d distance from the ground. What is the moment of inertia about the axis of rotation? What does the Parallel Axis Theorem say? If you know I, the moment of inertia about the axis of rotation, you can determine the initial angular speed ω0 from conservation of angular momentum mvd=Iω0.

When the rotation starts, the square does not translate: it rotates about the fixed axis through the obstacle. So the initial kinetic energy is 0.5Iω02.
The angular momentum about the axis of rotation is not (2/3)md2. You find it applying Parallel Axis Theorem.

You need to find the maximum height of the centre of the square. What is ω then?

ehild

12. Aug 13, 2014

### hanburger

Oh. I didn't realize that. Okay, I'm going to attempt again. Lots of things to keep in mind in these problems!

13. Aug 13, 2014

### hanburger

Okay, I think I've got it.

The rotational inertia at the moment of collision is the inertia about the center of mass plus m*(sqrt(2)d)2 --> (2/3)md2 + m*(sqrt(2)d)2 = (8/3)md2

So conservation of angular momentum for before/during collision gives
mvd=(8/3)md2ω --> ω = (3v/8d)

Conservation of energy after collision gives
0.5Iω2 = mg(h-d)

In this case, the moment of inertia is (2/3)md2. We then have
d + (1/3)d2ω2/g= h

Plugging in ω = (3v/8d), we have
d + (1/3)d2(3v/8d)2/g= h

h = d + 3v2/64g

Last edited: Aug 13, 2014
14. Aug 13, 2014

### hanburger

Actually, I think I am wrong about the moment of inertia. I think it is also (8/3)md2 after the collision. So conservation of energy after collision gives
0.5Iω2 = mg(h-d)

In this case, the moment of inertia is (8/3)md2. We then have
d + (4/3)d2ω2/g= h

Plugging in ω = (3v/8d), we have
d + (4/3)d2(3v/8d)2/g= h

h = d + 3v2/16g

15. Aug 13, 2014

### Nathanael

Looks good.

In the future it might be easier to not plug in the numbers till the end.

For example, you could have combined your first two equations [$mvd=Iω$ and $0.5Iω^2=mg(h-d)$] in the following way:

$0.5\frac{(mvd)^2}{I}=mg(h-d)$

And then solved for h (and then plug in I)

It just makes it a little easier to see where you went wrong Doesn't really matter, though.

16. Aug 13, 2014

Well done !

ehild


text:
# Question: How to plot multiple data points

December 13 2012 by
false
Maple

0

Hi

I am trying to model the change in lifetime versus mass and have the formula;

> T := 6.58*10^38*10^(-25)/x^3;                                      > plot(T, x = 10^10, 10^9, 10^8, 10^7, 10^6, 10^5, 10^4, 10^3, 10^2, 10, 10^0);Error, (in plot) unexpected options: [x = 10000000000, 1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1]
I want to plot for values between x=10^-11 and 0, i have this error and i am not sure why.


text:
(singing) Ooooooh Oh, oh ,oh Oh, here we go walking, talking like I know what pretty little sight Oh oh oh Oh, here we go you need to take a closer look at a pretty little sight oh I gotta work on my cardio (music starts) Crashing Hit a wall Right now I need a miracle Hurry up now I need a miracle Stranded reaching out I call your name, but your not around I say your name, but your not around I need you I need you I need you right now yeah I need you right now so don't let me don't let me don't let me down I think I'm losing my mind now It's in my head darling I hope that you'll be here when I need you the most so, don't let me don't let me don't let me down D- don't let me down... don't let me down down ohhh hhhhhh Don't let me down down down running out of time I really thought you were on my side but now there's nobody by my side I need you I need you I need you right now yeah I need you right now so don't let me don't let me down I think Im losing my mind now It's in my head darling I hope that you'll be here when I need you the most so Don't let me don't let me don't let me down don't let me down ohhhhhhhhhhh don't let me down down ohhhhhhh don't let me down ohhhhhhhhhh don't let me, don't let me ohhhhhhhhh don't let me down I need ya, I need ya, I need ya right now I need you right now So don't let me, don't let me, don't let me down (Blurred)I think I'm losing my mind now.... ohh, relax have you ever been in love? no, never Bullshit
コツ：単語をクリックしてすぐ意味を調べられます！

# Harley Quinn & Joker | Don't Let Me Down

2354
Yan Sheng Chen 2017 年 5 月 21 日 に公開

お勧め動画
1. ## 1. クリック一つで単語を検索

右側のスプリクトの単語をクリックするだけで即座に意味が検索できます。

2. ## 2. リピート機能

クリックするだけで同じフレーズを何回もリピート可能！

3. ## 3. ショートカット

キーボードショートカットを使うことによって勉強の効率を上げることが出来ます。

4. ## 4. 字幕の表示/非表示

日・英のボタンをクリックすることで自由に字幕のオンオフを切り替えられます。

5. ## 5. 動画をブログ等でシェア

コードを貼り付けてVoiceTubeの動画再生プレーヤーをブログ等でシェアすることが出来ます！

6. ## 6. 全画面再生

左側の矢印をクリックすることで全画面で再生できるようになります。

1. ## クイズ付き動画

リスニングクイズに挑戦！

1. クリックしてメモを表示

1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯，不妨使用「俚語字典」，或許會讓你有滿意的答案喔


text:
# A problem in placing caption exactly below the graph

I draw a graph in Latex but I'm having a problem in placing the caption of the graph since I want it be exactly below my graph at the left side of the page but it's always in the center regardless to whatever I do in order to bringin it to the left side , I'm using picture enviroment . I also looked at the similar problems but the solution did not work . this is the code which I'm using . which changes should I make in order to solve this problem? here I put 2 codes one of them is when i'm not using English and all the commands will work but the second one is when I'm using Farsi language where this problem remains :

\documentclass[a4]{book}

\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth =12cm
\textheight =19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}

\begin{document}

\begin{figure}[htp!]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{picture}(0,20)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,0.8){20}{\line(0,1){0.3}}
\end{picture}
\caption{ I want name below gragh  }
\end{figure}
\end{document}

the Second one :

\documentclass[a4]{book}

\usepackage{caption}
\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth =12cm
\textheight =19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
\setdigitfont[Scale=1]{XB Zar}
\begin{document}
\begin{figure}[!hb]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{LTR}
\begin{picture}(0,20)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,0.8){20}{\line(0,1){0.3}}
\end{picture}
\end{LTR}
\captionsetup{singlelinecheck=false}
\caption {نمایشِ قطبیِ یک نقطه}
\end{figure}
\end{document}

-
You can use the caption package to control the placement of the caption, as described in the answer to How can I left-align a caption?. If this solves your problem, please us know, so this question can be closed as a duplicate. Otherwise, please edit your question with more detail about what doesn't work. –  Jake Jul 10 '11 at 6:53
thank you very much but as I said before this does not solve my problem since : 1- I have so many graphs and I mentioned just one as an example ,as I don't want all of them have captions at left I cannot use this package because it makes all the captions at left 2- the language which I'm using is farsi so it turns the caption at the right side and I cannot solve the problem . –  Negin Jul 10 '11 at 8:18

you can setup the captionformat for such an image:

\documentclass{book}
\usepackage{caption}
\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth=12cm
\textheight=19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}
\begin{document}
\begin{figure}[htp!]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{picture}(0,20)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,08){20}{\line(0,1){0.3}}
\end{picture}
\captionsetup{singlelinecheck=false}
\caption{ I want name below graph}
\end{figure}

\end{document}

-
But it doesn't work when I change the language into Persian , I've just added the code which I already use with the suggested commands and it shows the caption at the right side of the page not the left ! –  Negin Jul 10 '11 at 12:32
@negin: then put the \captionsetup and \caption also into the LTR environment –  Herbert Jul 10 '11 at 13:37
what exactly do you want? all captions left aligned? –  Herbert Jul 10 '11 at 14:00
I did it but again I did encounter another problem , The label of caption is Farsi every where in this article I mean the part which is shown as figure 1.1 in English , it is شکل1-1 for example , but if I put it in the LTR environment it would be just like what is in english (figure1.1) is there any way to still keep the caption's label like what is in farsi while it is at the left side under the figure? –  Negin Jul 10 '11 at 18:17
no I don't want all the captions be at the left side and i do want just this caption so I omit the caption options in the package and instead use the \captionsetup which you did recommend and that was useful but still strugelling with the problem above –  Negin Jul 10 '11 at 18:21

thank you very much guys , my problem have just been solved by usind this code :

\documentclass[a4]{book}

\usepackage{caption}
\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth =12cm
\textheight =19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
\setdigitfont[Scale=1]{XB Zar}
\begin{document}
\begin{figure}[!hb]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{LTR}
\begin{picture}(0,0)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,0.8){20}{\line(0,1){0.3}}
\end{picture}
\end{LTR}
\captionsetup{singlelinecheck=off , format=hang,justification=raggedright}
\caption{نمایشِ قطبیِ یک نقطه}
\end{figure}
\end{document}

so the only change was

 \captionsetup{singlelinecheck=off , format=hang,justification=raggedright}

-