text:
## Ateneo Physics student Mariel Dee programs the NAO Robot at Nara Institute of Technology, Japan

Mariel Dee and the NAO Robot in NAIST, Japan

by Quirino Sugon Jr.

It is a creature perhaps from an another world clad in white armor like a Storm Trooper shorn of its helm, revealing two large ears like a stereo speaker but glowing like Tron disc blades.  Its deep set eyes stared into space like black coals burning in blue flame.  Its three-fingered hand grasped the air like claws, as if wielding an invisible light saber.  And from lips unseen, save for a tiny hole beneath its eyes, the creature spoke in a child-like voice reminiscent of the White Queen in Resident Evil:

“My name is NAO.”

NAO is an autonomous, programmable humanoid robot developed in 2004 by a French startup company Aldebaran Robotics.  NAO stands a little less than two feet and weighs like a baby.  With about 21 to 25 ways to move–the swaying and nodding of the head, the rotations of the arms and legs, the grasping of the fingers–NAO can walk like a toddler, pick up an object, or play football in RoboCup.

Mariel Dee, a BS in Applied Physics with Applied Computer Systems student in Ateneo de Manila University, had programmed the NAO robot during her internship at Nara Institute of Technology in Japan last 14-27 October 2012.

“One can program NAO,” she said, “by typing text commands directly to its computer processor.  But I programmed NAO using the Kinect.”

Kinect is a motion sensing input device developed by Microsoft for the Xbox 360 video game console.  Kinect has a camera that receives red, green, and blue (RGB) colors as input.  Kinect also has depth sensor which consists of an infrared laser and a CMOS APS–an active pixel sensor that determines the noise level at each pixel and uses its circuitry to cancel it out.  Kinect is the technology that powers games like Dance Central where you try to match the dance moves of your virtual dancer on the computer screen.  The closer your moves are to your virtual dancer, the higher your score.

What Mariel did is to make Kinect read her movements, translate them into skeleton frame motion, and use this as input in a language that NAO can understand.  The Kinect skeleton frame is made up of several joints.  The central spine consists of the head, shoulder center, spine, and hip center.  The arm  consists of the shoulder center, shoulder (side), elbow, wrist, and hand.  The leg consists of the hip center, hip (side),  knee, ankle, and foot.  In all there are 20 joints connected by 19 line segments.

In her program, Mariel made use of a limited number of NAO’s movements: walk forward and backward, walk sideways to the left and right, turn left and right, kick with right leg, bend down, push with hands.  But NAO is like a deaf boy trying to learn his first sign language.  For example, if  Mariel raises her right hand forward, NAO walks forward; if backward, NAO walks backward.  If Mariel raises her right hand to the sides, NAO walks sideways to the right; if her left hand, NAO walks sideways to the left.

“The main problem is how to make the program robust,” said Mariel.  ”NAO should be able to obey commands even if it were posed by child or an adult whose heights and arm lengths are different.  So what I did is to compute the angles formed at the joints and use this as a Kinect input for NAO.  In this way, the lengths such as that  between the elbow and the wrist or from the shoulder to the elbow would not matter but only the angle formed by these two segments at the elbow.”

The skeletal frame seen by Kinect looks like molecules in Chemistry, with the joints represented by atoms and segments by bonds.   In a way, what Mariel wishes to measure are the equivalents of body angles of a molecule.  For example, the body angle for a water molecule H-O-H at the Oxygen atom is 104.5 degrees.  But unlike molecules which have more or less fixed body angles, the body angles in a NAO robot have greater range of possible angles.

So can we now have robot combats as seen in old animes like Tosho Daimos or in more recent movies like Real Steel, with robots mimicking the actions of their human controllers?

“No.  We are not yet there,” said Mariel.  “But I am glad that after I left, the NAO robot that I programmed was showcased during an open house of the NAIST Robotics Laboratory.  NAIST is nice.  It is fun working there.  They still have other robots there like a humanoid face that mimics your emotions.  But NAO is so cute.”

## Ateneo physics faculty Juan Paolo Bermundo and Jennifer Damasco-Ty are now Ph.D. in Materials Science students in NAIST, Japan

by Cindy Cease

Mr. Juan Paolo Bermundo and Ms. Jennifer Damasco Ty went to Nara Institute of Science and Technology (NAIST) in Ikoma City, Japan last October2012, to pursue PhD in Materials Science. Mr. Bermundo would be part of the Information Device Science Laboratory to work on Thin Film Transistors (TFT) research. TFTs are electrical components found in display devices which act as active switches controlling individual pixels. Specifically, he will work on improving the electrical characteristics of TFTs by using novel materials and techniques. On the other hand, Ms. Damasco Ty would work on bulk heterojunction solar cells research.

Prior to their doctoral studies, Mr. Bermundo and Ms. Damasco Ty went to NAIST as interns during their graduate and undergraduate studies, respectively, in Ateneo de Manila University (AdMU). Below is an interview with Juan Paolo and Jennifer by the Ateneo Physics News:

A. INTERVIEW WITH JENNIFER DAMASCO-TY

Jennifer Damasco Ty with her sensei at NAIST

1. When will your studies start?

I will start as a research student on December. If all goes well, I will start as a PhD student on April.

2. Why did you choose NAIST?

Because of the opportunity available to me as an Ateneo alumni and faculty. The partnership between AdMU and NAIST makes me eligible to apply to the Screening of International Students by Special Recommendation. Also, as an undergraduate student, I was fortunate enough to participate in the NAPI internship which invites AdMU teachers and students to NAIST. During that time, I was able to observe the research in two laboratories and get to know the professors.

3. What will be your research area there?

I will be working on bulk heterojunction solar cells.

4. What will be the pros and cons of your studies in this university with your chosen field?

It is very easy to do research in NAIST because of the availability to many research equipment. Furthermore, NAIST also has good relationships with universities and research institutes abroad.

5. What are your future plans?

In the near future, I hope to work in a company pursuing similar research to gain experience. But I am also open to other opportunities that may be available to me after NAIST. Pursuing post-doctoral studies would be ideal.

B. INTERVIEW WITH JUAN PAOLO BERMUNDO

Juan Paolo Bermundo at NAIST

1. When will your studies start?

I started my PhD studies last October 1, 2012 at Nara Institute of Science and Technology (NAIST). The institute is in Takayama Science Town in Ikoma City, Nara Prefecture—in the countryside but relatively near to big cities such as Osaka (45 mins by train), Kyoto (45 mins) and Kobe (2 hours), and the historic city of Nara (30 min).

2. Why did you choose this university?

I went to NAIST last March 2012 as an intern and I found the research environment to be top class. I also liked how people are focused with their research. Ateneo also has a very good partnership with NAIST. In fact, there are a lot of Ateneo graduates here in NAIST especially from the ECCE department.

3. What will be your research area there?

I am now part of the Information Device Science Laboratory in the Graduate school of Materials Science in NAIST. I am currently working on Thin Film Transistors (TFT). TFTs can be found in display devices and they act as an active switch that controls individual pixels. I am specifically working on improving the stability of TFTs (such as IGZO TFTs) and developing doped ZnO using novel materials and techniques to improve its electrical characteristics. The goal is to develop new materials that can be used for next generation flexible displays.

An advantage of being an Ateneo student is that there are a lot of opportunities to go to several partner universities. Ateneo has a lot of International mobility programs such as the JTA and internships to other universities. Because of this, I was able to apply and get accepted as an intern student in NAIST last March 2011.

The scientific training that Ateneo provided in the Physics and Materials Science Engineering programs is also helpful in making it easier for me to keep up, adjust, and adapt to a new research environment. Being a faculty member is also an advantage because I can review the basics. Teaching develops one’s discipline and patience.

## Ateneo Physics faculty Artoni Ang went to a two-week internship at NAIST

by Quirino Sugon Jr.

Artoni Ang setting up of the UHV SEM for Auger Electron Spectroscopy

Artoni Ang, an Assistant Instructor and a graduate student of the Department of Physics of Ateneo de Manila University, went to Narra Institute of Technology (NAIST) last October 2012 for a two-week internship.  NAIST is a graduate school for Material Science, Information Science and Biological Sciences in Nara, Japan. Since 2006, it has been holding the NAIST Project for Interns (NAPI) where qualified students from the Ateneo de Manila University are invited to the laboratory of their choice for a 2 week internship.  For his internship, Artoni went to the Surface and Materials Laboratory under Professor Hiroshi Daimon.  This laboratory focuses on the study of nanomaterials, surfaces, and interfaces using the 10 m long Ultra High Vacuum (UHV) total analysis system developed by the laboratory.

Below is an interview of Artoni by the Ateneo Physics News:

1. How long have you been teaching in Ateneo?

Less than a year.  This is my second semester. I am teaching Ps 1 and 2 (Natural Science course) and various lab classes for Health Science and Biology majors. I am teaching 13 units this semester.

2.  Where do you do your research in Ateneo?

I work in Mr. Ivan Culaba’s Vacuum Coating Laboratory at the first floor of Faura Hall. Right now I am working on thin films on elastomeric substrates. I am trying to make stretchable diffraction grating. Specifically, I wish to reduce the cracking on the metal film as the grating is stretched. Metal films on stretchable substrates have many applications.  Diffraction gratings are just one of them.  Diffraction gratings are surfaces with very fine line grooves like furrows in a field, except that the distance between furrows is in the order of the wavelength of light, which is a few hundred nanometers or a fraction of the width of a hair strand.  Reducing cracking of the grating would increase the lifetime of such material.  I am working on the optical properties of materials by using the grating as a beam scanner. If we have a beam incident to the grating, we can change the angle of the of the reflected beam by stretching the grating. Stretching would change of the grating pitch or the distance between the line grooves.

3.  How is your work in the lab related to your work in the NAIST laboratory?

It is not exactly related but similar . Here we work with thin films with thickness levels in the nanometer and micrometer range in the wavelength of light. In NAIST we work with even thinner films in the Angstrom level or about 10 layers of atoms thick. Here we have high vacuum systems with pressures of $10^{-5}$ torr. In NAIST they have ultra high vacuum high systems of $10^{-10}$ torr. Most of the procedures in running the equipment are the same, except when the pressures reach $10^{-10}$: they have to bake the chambers. They wrap the chambers with heating blankets and bake the chambers for a month to get it to $10^{-10}$ torr. In our case to reach $10^{-5}$ torr, we only need 2 hours to pump it down. We use rotary pump and oil diffusion pump. In NAIST they use turbo molecular pumps and titanium sublimation pumps. After they bake their chambers they leave it at that pressure range. Then they leave all their pumps turned on 24 hours a day. In our case, we shut the system down once we are done with a specific experiment. We don’t need to keep it turned it overnight, because we can regain the same pressure the next day after 2 hours.

The panel that controls the substrate holders in their UHV system

3.  How many interns were from Ateneo?

There were 10 of us: 1 from Biology, 4 from Materials Science, and 5 from Information Science. I am part of the Material Science group. We were all assigned to different labs. We only see each other during scheduled trips or if we run into each other during the day. I am on my own from 9:00 a.m. to 5:00 p.m.

4.  What was your day like in the NAIST laboratory?

During my first day there, they held a welcoming tea party for me. So all of the grad students and most of the pofessors were there. I get to meet everyone. Since they were around 20 of them, I can’ t remember all their names. They opened the dried mangoes I brought. They all liked it. It wasn’t a formal Japanese tea ceremony.

I was there for 2 weeks. But lab work was only about 8 days. The usual day starts with me going to the laboratory at around 9:00 a.m, though I usually try to arrive a bit later. I don’t like to be the first one in the laboratory alone. And I stay outside to wait for a graduate student to arrive. They actually they told me where they hide the key, but I am not comfortable going inside without them. My day actually starts around 10:00 a.m. I waste an hour waiting outside.

Their lab is divided into two main parts: experimental section and the offices. In my  first day they assigned  me to an empty desk. And that is where I stay. In my first day, too, I met with one of the professors: Sakura Takeda-sensei. She created a schedule for me so that I will be working with different students with their own research projects. When working with them, they perform their experiments and explain the details to me. And in some cases. I get hands-on. In one particular case, we were working for two days on a scanning tunneling microscope. But it was repair and maintenance duties. We have to remove some of the main components. It was a long job. I think they finished all the maintenance work a few days before I left. And they started baking it. I guess they had to wait a month before they can even start using it.

I was assigned to do analysis on the data we collected in the experiments. I did image processing on diffraction patterns from RHEED (Reflection High Energy Electron Diffraction) experiments. I analyzed the data collected using ARPES (Angle Resolved Photoelectron Spectroscopy). From that data we were able to obtain the electron band structure of the Lead monolayer on Germanium. I was  suppose to get the mass of heavy hole from that data, but I did not get to finish the calculations. They had their own software which came with equipment. And there was another software that I think one of the graduate students wrote using java. It just converts the data collected from ARPES to electron band diagram we are all familiar with.

I worked with another student doing RHEED experiments on Indium monolayer on Silicon substrates. I also used the Scanning Electron Microscopes on Iron polycrystalline sample. I was suppose to help on the experiment involving Bismuth on Silicon, but one of the major gauges broke down, so we have to stop.

I attended study sessions, a laboratory meeting, and a laboratory colloquium. In the study session, we spent around an hour discussing theoretical principles behind ARPES. In the colloquium, we spent the entire morning listening to two graduate students presenting papers relevant to their work. It would have been were more interesting if they were reporting in English, but they were speaking in Japanese. I sat there the entire morning looking at their slides. In the afternoon is the colloquium where every graduate student presented a slide or two about their progress since the last lab meeting. Some of the students were presenting slides whose only progress is that  they attended courses or studied their exam. Nevertheless, they still have to present those because it is apart of their process. There are also students who made a lot of progress. They presented a lot of the data they were collecting. They also made me present a brief overview of the research that I do in the Philippines. I had to leave after 4 hours. I think their meeting lasted 6 hours–the whole afternoon. Between the colloquium and laboratory meeting is lunch break. And there is 30 minutes of general laboratory cleanup.  Everybody cleans by sweeping or mopping the floors.

During the first week my sensei gave me a lot of books. After 5:00 p.m. , I usually go straight to the dorm and read the books–not the entire book but only the selected chapters. I think she was surprised that I can read them overnight, because she is just used that her students have difficulty reading books in English. So from their point of view, I read really fast.

A group photo with the professors and students of the Surface and Material Science Laboratory

5.  What do you like best during your stay in Japan?

Their transportation system is very organized. If the train is scheduled to arrive at 8:02 a.m., it will actually arrive at 8:02 a.m..  So if we go out for dinner or cultural trip, our entire travel itinerary was already arranged, because they know the schedules of the trains and buses. It was easy getting around even without a car.  And this was in Narra which is not one of the big urbanized area. But despite that the transportation system is very good. In fact when you go out to the gate of NAIST, the first thing that you see is a rice field and it smells like a rice field. But then there is a bus station in front of the gate.  So even if it is in the rural part of Narra, we can still get around. We can also actually walk to the closest train station, but it takes 40 minutes.

It seems very safe there. There were times we walked to the train station in the middle of the night beside the big mall at around 10 or 11 p.m. We were not worried about being held up. The sense of security is also visible in the campus itself. They don’t have a close gate. It is just an open road that goes toward the campus. I don’t see any security guard walking around.

Of course the food was great. The organizers brought us to Japanese restaurants. We got to try sushi, yakiniku, okonomiyaki, ramen, and some other Japanese foods. Before I went there, I promised myself that I will never say no. I will eat whatever served to me. Half of what I ate there, I don’t know what it was. And then we had weekend trips to Kyoto, Osaka, and Narra. We got to visit some of the old temples and an aquarium in Osaka. During our last day there, they took us to the shopping district in Osaka,where they sold everything from electronics to anime things to clothes.

6.  Any parting thoughts?

Overall it was a good experience. You get to see how research is done in universities in other countries. The research culture is very different. Most of the students are full-time researchers. They don’t attend courses. They only worry about their research projects. They spend an entire day in the lab, because they have a desk there. They are really focused on what they are doing in the lab. Unlike in my experience as a student, my attention is divided in the courses I am taking and the research I am doing. Of course, it would be easier if you are only focused on research work.

It was also eye-opening to me to see how disciplined the Japanese people are.  After eating in the cafeteria, they clean up. We don’t see people littering. They all follow traffic rules, unlike here in the Philippines where traffic is very chaotic.

After I finish my Masters degree, I plan to apply for Ph.D. degree outside the Philippines. I am now looking at Erasmus Mundus program for Materials Science. I have already informed my Professors in NAIST that I will be applying there, too. Hopefully, I get accepted to one of them. If not , I shall also apply to universities in the United States.


text:
37,256 views

A $5$ stage pipelined CPU has the following sequence of stages:

• IF – instruction fetch from instruction memory
• RD – Instruction decode and register read
• EX – Execute: ALU operation for data and address computation
• MA – Data memory access – for write access, the register read at RD state is used.
• WB – Register write back

Consider the following sequence of instructions:

• $I_1$: $L$ $R0, loc$ $1$; $R0 \Leftarrow M[loc1]$
• $I_2$: $A$ $R0$, $R0$; $R0 \Leftarrow R0 +R0$
• $I_3$: $S$ $R2$, $R0$; $R2 \Leftarrow R2-R0$

Let each stage take one clock cycle.

What is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of $I_1$?

1. $8$
2. $10$
3. $12$
4. $15$

$A)Without\ Operand-forwarding$

$1) Split-phase:Clock-cycles=11$

$2) Without\ split-phase: Clock-cycles=13$

$B)With\ Operand-forwarding$

$Clock-cycles=8$
@KUSHAGRA गुप्ता so what should we assume  operand forwarding or no operand forwarding in such questions where nothing is mentioned ?

go for the best case!

Without data forwarding:

13 clock - WB and RD state non overlapping.

$$\begin{array}{|c|c|c|c|c|} \hline \textbf {T1} & \textbf {T2} & \textbf {T3} & \textbf {T4} & \textbf {T5} & \textbf {T6} & \textbf {T7} & \textbf {T8} & \textbf {T9} & \textbf {T10} & \textbf {T11} & \textbf {T12} & \textbf {T13} \\\hline \text{IF}& \text{RD} & \text{EX} & \text{MA} & \text{WB} & & \\\hline \text{} & \text{IF} & &&&\text{RD} & \text{EX} & \text{MA} & \text{WB} & \text{} & \text{}\\\hline &&&&& \text{IF}& & & &\text{RD} & \text{EX} & \text{MA}&\text{WB} \\\hline \end{array}$$

Here, WB and RD stage operate in Non-Overlapping mode.

11 clock - WB and RD states overlapping.

$$\begin{array}{|c|c|c|c|c|} \hline \textbf {T1} & \textbf {T2} & \textbf {T3} & \textbf {T4} & \textbf {T5} & \textbf {T6} & \textbf {T7} & \textbf {T8} & \textbf {T9} & \textbf {T10} & \textbf {T11} \\\hline \text{IF}& \text{RD} & \text{EX} & \text{MA} & \text{WB} & & \\\hline \text{} & \text{IF} & &&\text{RD} & \text{EX} & \text{MA} & \text{WB} & \text{} & \text{}\\\hline &&&& \text{IF}& & &\text{RD} & \text{EX} & \text{MA}&\text{WB} \\\hline \end{array}$$

Split Phase access between WB and RD means:

WB stage produce the output during the rising edge of the clock and RD stage fetch the output during the falling edge.

In Question it is mentioned

for write access, the register read at RD state is used.

This means that for writing operands back to memory, register read at RD state is used (no operand forward for STORE instructions).

Note

• As in any question in any subject unless otherwise stated we always consider the best case. So, do overlap - unless otherwise stated. But this is for only WB/RD
1. Why there is stall for I2 in T3 and T4 ?
RD is instruction decode and register read. IF we execute RD of I2 in T3, data from memory will not get stored to R0 hence proper operands are not available at T3. Perhaps I2 has to wait until I1 write values to memory.
2. WB of I1 and RD of I2 are operating in same clock why it is so ?
If nothing has mentioned in question. This scenario is taken into consideration by default. It is because after MA operands will be available in register so RD and WB could overlap .

With data forwarding

(Should be the case here as question says no operand forwarding for memory register for STORE instructions)

8 clock cycles

1. Why there is a stall I2 in T4 ?
Data is being forwarded from MA of I1 EX of I2 .MA operation of I1 must complete so that correct data will be available in register .
2. Why RD of I2 in T3 ? Will it not fetch incorrect information if executed before Operand are forwarded from MA of I1 ?
Yes. RD of I2 will definitely fetch INCORRECT data at T3 . But don't worry about it Operand Forwarding technique will take care of it .
3. Why can't RD of I2 be placed in T4 ?
Yes . We can place RD of I2 in T4 as well. But what is the fun in that ? pipeline is a technique used to reduce the execution time of instructions . Why do we need to make an extra stall ? Moreover there is one more problem which is discussed just below .After reading the below point  Just think if we had created a stall at T3 !
4. Why can't RD of I3 be placed at  T4 ?
This cannot be done . I3 cannot use RD because Previous instruction I2 should start next stage (EX) before current (I3) could utilize that(RD) stage . It is because data will be residing in buffers.
5. Can an operand being forwarded from one clock cycle to same clock cycle ?
No, the previous clock cycle  must complete before data being forwarded . Unless split phase technique is used
6. Cant there be a forwarding from EX stage(T3) of I1 to EX stage(T4) of I2 ?
This is not possible . See what is happening in I1 . It is Memory Read .So data will be available in register after memory read only .So data cannot be forwarded from EX of I1 .
7. In some case data is forwarded from MA and some case data is forwarded from EX Why it is so ?
Data is forwarded when it is ready . It solely depends on the type of instruction .
8. When to use Split-Phase ?
We can use split phase if data is readily available like between WB/RD and also when operand forwarding happens from EX-ID stage, but not from EX-EX stage. We cannot do split phase access between EX-EX because here the instruction execution may not be possible in the first phase. (This is not mentioned in any standard resource but said by Arjun Suresh by considering practical implementation and how previous year GATE questions have been formed)

[Mostly it is given in question that there is operand forwarding from A stage to B stage eg:https://gateoverflow.in/8218/gate2015-2_44 ]

Split-Phase can be used even when no Operand Forwarding because they aren't related.

References

Similar Questions

Discussions

by

I have a doubt regarding the 8th point in the answer.

Its true that the EX-EX operand forwarding cant use split phase. But I think its not because of this

“We cannot do split phase access between EX-EX because here the instruction execution may not be possible in the first phase”.

But the reason probably will be , you cant do split phase if you are forwarding from any stage to EX because the write in split phase happens in first phase and read happens in second phase, so there is no time to execute the instruction after reading the forwarded operand in the second phase. I think that the reason we are not using split phase in MA → EX stage also.

@fred20978 yes, that’s what the other sentence is also trying to convey.

edited by

@Deepak Poonia @gatecse Sir is there split phase between $I_1\text{ WB}$ and $I_3 \text{ RD}$? Because buffer value will change after $I_2$ executes its $\text{EX}$ phase, so how data is forwarded from $I_1 \text{ WB}$ to $I_3 \text{ EX}$?

For write access the register read at RD stage is used- this means for a STORE instruction we cannot get operand forwarded but only from RD stage. So, we can assume data forwarding is possible for all other instructions.

 T1 T2 T3 T4 T5 T6 T7 T8 IF RD EX MA WB IF RD EX MA WB IF RD EX MA WB MA -> EX forwarding done between I1 and I2 EX -> EX forwarding done between I2 and I3

http://www.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/forward.html

by

@ arjun sir, is operand forwarding taken in default case?

@sushmitaYeah as nothing mentioned in question which technique shall be used?

Hi Arjun Sir,

Instead of forwarding R0's value from EX stage of I2 to EX stage of I3, is it not possible to use split phase technique to forward R0's value from EX stage of I2 to RD stage of I3 in the 5th clock cycle T5 itself?

$8$ cycles required with operand forwarding.

it is not given that RD and WB stage could overlap.

I feel Hamacher's book says something different about point 6 in the answer

6. Cant there be a forwarding from EX stage(T3) of I1 to EX stage(T4) of I2 ?
This is not possible . See what is happening in I1 . It is Memory Read .So data will be available in register after memory read only .So data cannot be forwarded from EX of I1.

In 6th edition of Hamacher's book, section 6.4. Data Dependencies, it gives following instructions:

Add R2, R3, #100
Subtract R9, R2, #30

Without operand forwarding, the solution is given as follows:

With operand forwarding, its given as follows:

Author says ALU's output can be given back as a feedback to its input to achieve above.

Based on this, I feel it should be possible for EX of I2 to execute in T4. What I am missing here :( ???

I1: R0<= M[loc1]

lets break it down to all stages...

as that given program was executing in a pipelined processor at a certain time PC got this address of the above instruction while executing a previous instruction..say I0

now its turn for I1.

first in IF CYCLE the instruction was fetch from the memory location previously pointed by pc.

now hypothetically imagine :>>

say instruction was 0-101-11-10 (say 8 bit address)

now in RD phase its its decoded like this.:::>>>>

0 means direct address i.e. loc1=10

11 means register R0

10 is the address of loc1(we still dont know whats the data in loc1)

no register to be read for this instruction as u can see

in EX phase if it was an indirect address or indexed or relative address the effective address would have been computed..

still don't know whats the data in loc1.

now in MA phase actual load happens.

the data from mem location loc1(i.e. 10) on R0

so only after MA phase we got correct value in R0

that's why operand forwarded from MA and not from EX.

There are lots of things going on here...

without data forwarding and split phase..

its simply 13 clk cycles..(fully understandable)

without data forwarding but with split phase

its 11 clk cycles...

why?

see split phase meaning doing 2 diff things in each half of 1 cycle..

in first half we use it to write and other half to read.

we can do both in 1st half only as we do have diff h/w lines for reading and writing (suppose)

but that will led us into wrong or old value read.

now in split phase we use PIPO shift registers as buffers in between 2 successive stages.This makes the processor perform write and read in 1 clk cycle.

now coming to operand/data forwarding..(8 clks)

we have extra hardwares mostly comparators to check for RAW dependencies..

we say domain of an instruction is the registers in between operation is being done

range of instruction is register on which o/p is being written.

so we can perform comparation between

range(instruction i-1) & domain (instruction i)

so by default assume that when operand forwarding is not used theres no such hardware..else there is..

this is why even if with operand forwarding we are reading the regs in T3 cycle it does not matter as along with this extra circuitry is checking fot RAW and as RAW exists it will lead to 1 stall cycle.

we forward dummy signals (all 0) to next exec. phase .

thats why for I2 after RD ,EX phase does nothing in T4.
Everywhere the explanation for this question is wrong, The correct explanation is:

OPERAND FORWARDING:

(RAW):

1. In case of LOAD statements data forwarding fails and the operand is available in (MA) stage of instruction Here I1 (MA) and I2 (RD)

2. While In case of ALU type statements the operand is available in EX stage of instruction Here I2(EX) and I3(RD)

This is the correct way to do such questions.

Statement 1 mentioned above is the drawback of operand forwarding due to which it is not able to solve all such dependencies.

because i am thinking same as you are...

Hope this helps you..

This has some conceptual issues. Pipeline wont stall in RD2 stage for no reasons. These decision is taken by CPU control unit after seeing(ie: decoding) the instruction). So immediately after IF2 it will perform RD2.

1
19,908 views
2
19,717 views
3

format: plain


text:
# College math questions and answers

Recent questions in Post Secondary
slaggingV 2020-11-01

### Solve the following problems applying Polya’s Four-Step Problem-Solving strategy. If six people greet each other at a meeting by shaking hands with one another, how many handshakes take place?

geduiwelh 2020-11-01

### class council determined that its profit from the upcoming homecoming dance is directly related to the ticket price for the dance. Looking at past dances, the council determined that the profit pp can be modeled by the function $p\left(t\right)=-12{t}^{2}+480t+30$, where tt represents the price of each ticket. What should be the price of a ticket to the homecoming dance to maximize the council's profit? Price

Jerold 2020-11-01

### Use sigma notation to express the following 1 - 2 + 3 - 4 + 5 - 6 + 7 - 8

Cheyanne Leigh 2020-11-01

### Given f(x)=6x+5, describe how the graph of g compares with the graph of f. g(x)=6(0.2x)+5 Select the correct choice below, and fill in the answer box to complete your choice. A. The graph of g(x) is translated _ unit(s) to the left compared to the graph of f(x). B. The graph of g(x) is translated _ unit(s) down compared to graph of f(x). C. g(x) has a scale factor of _ compared to f(x). Because it scales the vertical direction, the graph is stretched vertically. D. g(x) has a scale factor of _ compared to f(x). Because it scales the vertical direction, the graph is compressed vertically. E. g(x) has a scale factor of _ compared to f(x). Because it scales the horizontal direction, the graph is stretched horizontally. F. g(x) has a scale factor of _ compared to f(x). Because it scales the horizontal direction, the graph is compressed horizontally. G. The graph of g(x) is translated _ unit(s) to the right compared to the graph of f(x). H. The graph of g(x) is translated _ unit(s) up compared to graph of f(x).

iohanetc 2020-11-01

### Describe the transformations of $f\left(x\right)=\sqrt{3}\left\{x\right\}$ and $h\left(x\right)={x}^{3}$ that result in the functions listed below. and and

e1s2kat26 2020-11-01

### Let $\gamma =\left\{{t}^{2}-t+1,t+1,{t}^{2}+1\right\}\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\beta =\left\{{t}^{2}+t+4,4{t}^{2}-3t+2,2{t}^{2}+3\right\}be\phantom{\rule{1em}{0ex}}\text{or}\phantom{\rule{1em}{0ex}}deredbasesf\phantom{\rule{1em}{0ex}}\text{or}\phantom{\rule{1em}{0ex}}{P}_{2}\left(R\right).$ Find the change of coordinate matrix Q that changes

Armorikam 2020-11-01

### Give full and correct answer for this questions 1) The standard erroe of the population mean can be estimated by 2)For an experiment comparing two treatment conditions, an independent-measures design would obtain ? score(s) for each subject and a repeated-measures design would obtains ? score(s) for each subject. 3) Which of the following describes an independent-measures research study?

nagasenaz 2020-11-01

### To calculate: The intercepts on the coordinate axes of the straight line with the given equation $2y-4=3x$

CoormaBak9 2020-11-01

### Give a full correct answer for given question 1- Let W be the set of all polynomials $a+bt+c{t}^{2}\in {P}_{2}$ such that $a+b+c=0$ Show that W is a subspace of ${P}_{2},$ find a basis for W, and then find dim(W) 2 - Find two different bases of ${R}^{2}$ so that the coordinates of $b=\left[\begin{array}{c}5\\ 3\end{array}\right]$ are both (2,1) in the coordinate system defined by these two bases

sanuluy 2020-11-01

### Find the critical points of the following functions on the given intervals. Identify the absolute maximum and absolute minimum values (if they exist). $f\left(x\right)={x}^{3}-6{x}^{2}\text{on}\left[-1,5\right]$

smileycellist2 2020-11-01

### Solve the following IVP using Laplace Transform${y}^{\prime }-2y=1-t,y\left(0\right)=4$

Jason Farmer 2020-11-01

### The equivalent polar coordinates for the given rectangular coordinates. A rectangular coordinate is given as (0, -3).

Dolly Robinson 2020-11-01

### Find the following integral. $\int \frac{{x}^{2}-1}{{x}^{2}}dx$

Tahmid Knox 2020-11-01

### Find the x-and y-intercepts of the graph of the equation algebraically. $y=-3\left(2x+1\right)$

illusiia 2020-11-01

### Find the x-and y-intercepts of the graph of the equation algebraically. $y=\frac{3}{4}x-\frac{1}{4}$

Reggie 2020-11-01

### The random variable X follows a normal distribution $?\left(20,102\right)$. Find $F\in dP\left(?>30\right)$,

Wotzdorfg 2020-11-01

Kye 2020-11-01

### use Green’s Theorem to find the counterclockwise circulation and outward flux for the field F and the curve C. $F=\left({y}^{2}-{x}^{2}\right)i+\left({x}^{2}+{y}^{2}\right)j$ C: The triangle bounded by y = 0, x = 3, and y = x

texelaare 2020-11-01

### The given matrix is the augmented matrix for a system of linear equations. Give the vector form for the general solution. $\left[\begin{array}{cccccc}1& -1& 0& -2& 0& 0\\ 0& 0& 1& 2& 0& 0\\ 0& 0& 0& 0& 1& 0\end{array}\right]$

UkusakazaL 2020-11-01

### Solve $f\left(t\right)={e}^{t}\mathrm{cos}t$

College Math problems only seem challenging at first, yet what they truly represent is not much harder than high school Math with some equations that are closer to the engineering approach. Approaching your college math helper is essential because your questions may just have to be worded differently. Regardless if you are dealing with equations or need answers to your college math questions, taking a look at college math equations will let you see things differently. Approach college math answers step-by-step. The majority of college math problems with answers represented here will be similar to what you already have.


text:
# Which algorithm can be used to reduce dimension of multiple time series?

In my dataset, a data point is essentially a Time series of 6 feature over a year per month so in all, it results in 6*12=72 features. I need to find class outliers so I perform dimensionality reduction hoping the difference in data is maintained and then apply k-means clustering and compute distance.

For dimensionality reduction I have tried PCA and simple autoencoder to reduce dimension from 72 to 6 but results are unsatisfactory.

Can anyone please suggest any other way to reduce dimension of this type of data.

## 2 Answers

So, to be clear, you observe $$N$$ samples with $$P$$ measurements at $$T$$ times (where $$P = 6$$ and $$T = 12$$).

I would first determine whether or not you expect the joint distribution of your $$P$$ features to change over time. For example, if these features are $$X$$, does $$\mathcal{P}(X) = \mathcal{P}(X | T)$$ for all values of $$T$$? If so, you could do something like stack your data over time (so, you'd have $$NT$$ samples of $$P$$ features) and perform PCA, then use the top $$k$$ loadings to rotate the measurements at individual timepoints, leaving you with $$N$$ $$k$$-dimensional time series of length $$T$$. You could choose $$k = 1$$ if necessary, and use it to visually identify outliers or set a simple cutoff. If not, you'd want to be more careful with this technique - especially if the covariance changes. If it's the variance that's changing but correlation is remaining the same, perhaps some procedures can be done (e.g. perform PCA on the correlation matrix/standardized data) and this technique would still work.

What form do you expect your outliers to take? If it's a temporary deviance from the rest of the sample (e.g. only at one or two measurement times), your technique of PCA on the concatenated data will not be very sensitive. The technique I just described would be more sensitive.

• For some cases, these $P$ features might vary over time. For a few cases, they might even show a somewhat cyclical behavior. To elaborate a little, I am working with a collection of land cover images. The $N$ samples represent N pixels, and $P$ features are the 6 bands-(R,G,B,NIR,SWIR-1,SWIR-2). So yes these values might vary over the timespan of 1 year. – Faiz Kidwai Aug 1 '19 at 5:54
• Perhaps this would be a good use case for an autoencoder with a prior over the latent space to enforce smoothness over time (e.g. a GP prior over each individual dimension of the latent space). If $N$ is too large for this to be effective, then perhaps a small term on the autoencoder loss to encourage neighboring timesteps' latent spaces to be close together (e.g. by Euclidean distance) would be effective. – wn0 Aug 9 '19 at 14:29

You can apply the Wrapper Sequential Feature Selection (SFS) algorithm. SFS is a family of greedy search algorithms that are used to reduce an initial d-dimensional feature space to a k-dimensional feature subspace where k < d. The idea of the algorithm is to run any classification algorithm (parameter) based on k_features (parameter). It will select those feature gives the highest accuracy for corresponding algorithm.

clf = svm.SVC()

# Build step forward feature selection
sfs1 = sfs(clf,
k_features=15,
forward=True,
floating=False,
verbose=2,
scoring='accuracy',
cv=5)

# Perform SFFS
sfs1 = sfs1.fit(X_Train, Y_Train)

feat_cols = list(sfs1.k_feature_idx_)
print(feat_cols)

One downside is- you have to fix the desired number of features, the algorithm will give you which those features better fits in terms of accuracy. For your scenario, you have 72 features. Let's say, you want to use only 15 features but you don't know which 15 features among these 72 features. SFS will tell you the best selection. Here, in the above code, feat_cols is the list of those 15 features.


text:
# Integration with exponential variables

Using $f(t)=(1/2)e^{-t/2}$ for $1<t<3$. Solve the integral for $f(t)$

$$P(1<T<3) = \int_1^{3} f(t) dt\tag{i}$$

$$P(1<T<3) = \int_1^{3} (1/2)e^{-t/2} dt\tag{ii}$$

$$P(1<T<3) = (1/2)\int_1^{3} e^{-t/2} dt\tag{iii}$$

$$P(1<T<3) = e^{-1/2}-e^{-3/2} \tag{iv}$$

My question is how do we show the middle steps between $(iii)$ and $(iv)$. I forgot how to solve this type of integrals. Can someone please show me the correct way with all the steps please?

-
$$\int \mathrm{e}^{at}dt = \frac{1}{a}\mathrm{e}^{at} + C$$ then assuming you know how to use limits for definite integrals you can proceed. –  Chinny84 Mar 17 '14 at 18:05

$$\int_1^{3} (1/2)e^{-t/2} dt$$

Let $u = -\frac 12 t$. Then $\,du = -\frac 12\,dt$.

If we make our substitution as indicated above, we should change the bounds of integration:

When $t = 1, \; u = -\frac 12 t = -\frac 12$.

When $t = 3, \; u = -\frac 12(3) = -\frac 32.$

So \begin{align}\int_1^{3} (1/2)e^{-t/2} dt & = -\int_1^3 e^{\overbrace{{-t/2}}^{u}}\underbrace{\left(-\frac 12\, dt\right)}_{du}\\ \\ & = -\int_{-1/2}^{-3/2} e^u\,du \\ \\ & = -e^u\Big|_{-1/2}^{-3/2}\\ \\ & = -(e^{-1/2} - e^{-3/2}) = e^{-3/2} - e^{-1/2}\end{align}

-
Thank you! I remember now. This is actually a simple way of thinking about it step by step. Thanks again. –  9959 Mar 17 '14 at 18:35
You're welcome! –  amWhy Mar 17 '14 at 19:19


text:
# VCS Hooks

## Mercurial hook

To use the Mercurial hook on any commit or qrefresh, change your .hg/hgrc file like this:

[hooks]
commit = python:flake8.hooks.hg_hook
qrefresh = python:flake8.hooks.hg_hook

[flake8]
strict = 0
complexity = 12

If strict option is set to 1, any warning will block the commit. When strict is set to 0, warnings are just printed to the standard output.

complexity defines the maximum McCabe complexity allowed before a warning is emitted. If you don't specify it, it's just ignored. If specified, it must be a positive value. 12 is usually a good value.

## Git hook

To use the Git hook on any commit, add a pre-commit file in the .git/hooks directory containing:

#!/usr/bin/env python
import sys
from flake8.hooks import git_hook

COMPLEXITY = 10
STRICT = False

if __name__ == '__main__':
sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore='E501'))
# Alternatively
# sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT,
#                   ignore=['E501']))

If strict option is set to True, any warning will block the commit. When strict is set to False or omitted, warnings are just printed to the standard output.

complexity defines the maximum McCabe complexity allowed before a warning is emitted. If you don't specify it or set it to -1, it's just ignored. If specified, it must be a positive value. 12 is usually a good value.

lazy when set to True will also take into account files not added to the index.

Also, make sure the file is executable and adapt the shebang line so it points to your Python interpreter.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.


text:
# DGK Jahrestagung 2021

15-18 March 2021
DESY
Europe/Berlin timezone

## Solid-solution modelling using first-principles methods: Case studies for (Cu,Ag)$_2$ZnSnSe$_4$ and (FA,Cs)PbI$_3$

17 Mar 2021, 15:55
20m
https://desy.zoom.us/j/96646085289

### https://desy.zoom.us/j/96646085289

Oral contribution Energy materials: batteries, photovoltaics, etc.

### Speaker

Dr Daniel Fritsch (Helmholtz-Zentrum Berlin)

### Description

Our quest to find new materials to be utilised in technological applications leads us more and more towards solid solutions between different materials. These solid solutions allow for the fine-tuning of desired material properties, but also pose additional problems in experimental characterisation and theoretical modelling. While we’re able to deal with fractional occupancies of Wyckoff positions in experimental investigations, this is not the case for theoretical materials modelling based on density functional theory, and we have to resort to additional methods to properly model the structural, electronic, and optical properties of solid solutions.

Here, we’re using first-principles calculations based on density functional theory to shed some light into the structure-property relations in the (Cu,Ag)$_2$ZnSnSe$_4$ and (FA,Cs)PbI$_3$ solid solutions (FA: formamidinium). While (Cu,Ag)$_2$ZnSnSe$_4$ only requires the mixing over different Wyckoff positions, in (FA,Cs)PbI$_3$ we additionally have to account for the rotations of the FA cation. For both systems, in order to simulate the different concentrations within the solid solution, we’re employing a supercell approach. All our structure models are geometry optimised employing the recently developed SCAN exchange and correlation functional. In order to obtain more reliable electronic and optical properties, selected optimised structures are subjected to one-shot calculations employing the more accurate hybrid functional HSE06.

This work made use of computational resources provided by the North-German Supercomputing Alliance (HLRN).

### Primary author

Dr Daniel Fritsch (Helmholtz-Zentrum Berlin)

### Co-author

Prof. Susan Schorr (Helmholtz-Zentrum Berlin)

### Presentation Materials

There are no materials yet.


text:
# How do Oort's constants relate to shear and vorticity?

I am told to show that Oort's constants represent shear and vorticity in the velocity field of an orbiting star. I know that Oort's constants are defined as:

$$A = \frac{1}{2}(\frac{v_{\bot,0}}{R_{0}}-\frac{dv_{\bot}}{dR})$$

$$B = -\frac{1}{2}(\frac{v_{\bot,0}}{R_{0}}+\frac{dv_{\bot}}{dR})$$

and are evaluated at $$R_{0}$$. I also know that shear roughly describes how the circular orbit is stretched and vorticity describes something like the circular motion relative to a given point that itself is in a circular orbit.

How can these equations be related to these concepts?


text:
# IPv6 - ULAs - Am I understanding use correctly?

Brian Chandler 07/11/2018 at 16:46. 1 answers, 97 views

Tinkering more with IPv6 and trying to unlearn the IPv4 stuff. Assume my router is correctly respecting the reserved addresses.

• LLIPs aren't going to pass through to the router's outside interface and will be used only between devices connected to that router on the inside interface(s).
• GIPs are accessible from the internet/routable.
• ULAs would be used like if you had several routers (like one per room in a college) or if you were connecting sites over a VPN tunnel. So routable, but shouldn't route publicly.

Is my understanding of the ULAs use correct?

Ron Maupin 07/11/2018 at 17:39.
• Link-local addresses (fe80::/10) only work on the link where they are addressed. Evey link uses the same addressing. (see RFC 4291, IP Version 6 Addressing Architecture)
• Global addresses (2000::/3) are globally unique (ignoring anycast for now), and packets addressed with global addresses can be routed over the public Internet. (see RFC 4291, IP Version 6 Addressing Architecture)
• Unique-Local addresses (fc00::/7) are blocked by ISPs, so packets addressed with ULA cannot be routed on the public Internet, and are for traffic that will never be sent on the public Internet. There are two parts to ULA. The first half of the range (fc00::/8) is reserved for assignment by a yet-to-be-determined global authority. The second half of the range (fd00::/8) is for local assignment, but the next 40 bits of the prefix must be randomly assigned, and you cannot use consecutive 48-bit prefixes. (see RFC 4193, Unique Local IPv6 Unicast Addresses)

1 .Introduction

This document defines an IPv6 unicast address format that is globally unique and is intended for local communications [IPV6]. These addresses are called Unique Local IPv6 Unicast Addresses and are abbreviated in this document as Local IPv6 addresses. They are not expected to be routable on the global Internet. They are routable inside of a more limited area such as a site. They may also be routed between a limited set of sites.

Local IPv6 unicast addresses have the following characteristics:

• Globally unique prefix (with high probability of uniqueness).

• Well-known prefix to allow for easy filtering at site boundaries.

• Allow sites to be combined or privately interconnected without creating any address conflicts or requiring renumbering of interfaces that use these prefixes.

• Internet Service Provider independent and can be used for communications inside of a site without having any permanent or intermittent Internet connectivity.

• If accidentally leaked outside of a site via routing or DNS, there is no conflict with any other addresses.

• In practice, applications may treat these addresses like global scoped addresses.

This document defines the format of Local IPv6 addresses, how to allocate them, and usage considerations including routing, site border routers, DNS, application support, VPN usage, and guidelines for how to use for local communication inside a site.

Every interface will have a link-local address. Each interface can also have multiple global and/or ULA addresses. The global addresses are used to communicate on the public Internet (or internally,too), and the ULA addresses can be used for internal site communication to prevent the traffic from ever going out on the public Internet.


text:
My colleague K.-J. Wirths came up with another Rule of Sarrus for ${4\times 4}$ matrices. His suggestion is somehow closeto the original (at least graphically) and is easier to memorize. One has to use the “original” Rule of Sarrus for the ${4\times 4}$ case but now three times. For the first case use the original matrix and for the next two case one has to permute two columns. Graphically this gives the following the pictures:

In principle this generalizes to larger ${n\times n}$ matrices. But beware: ${n!}$ is large! For the ${5\times 5}$ case one has a sum of 120 products but each “standard Sarrus” only gives 10 of them. Hence, one has to figure out 12 different permutations. In the ${n\times n}$ case one even needs to memorize ${\frac{n!}{2n}}$ permutation, let alone all the computations…

I am sure that somebody with stronger background in algebra and more knowledge about permutation groups could easily figure out what is going on here, and to visualize the determinants better.

Update: Indeed! Somebody with more background in algebra already explored how to generalize the Sarrus rule to larger matrices. Again it was my colleague K.-J. Wirths who found the reference and here it is:

• Обобщенное правило Саррюса, by С. Аршон, Матем. сб., 42:1 (1935), 121–128

and it is from 1935 already! If you don’t speak Russian, in German it is

• “Verallgemeinerte Sarrussche Regel”, S. Arschon, Mat. Sb., 42:1 (1935), 121–128

and if you don’t speak German either, you can visit the page in mathnet.ru or to the page in the Zentralblatt (but it seems that there is no English version of the paper or the abstract available…) Anyway, you need $(n-1)!/2$ permutations of the columns and apply the plain rule of Sarrus to all these (and end up, of course, with $2n(n-1)!/2=n!$ summands, each of which has $n$ factors – way more than using LU of QR factorization.)

There is this famous Rule of Sarrus for calculating the determinant of a ${3\times 3}$ matrix. The nice thing is, that one can remember it quite quickly with the help of a simple picture which I cite from the Wikipedia page:

Being at a university which has a lot of engineers who need to learn mathematics, there are plenty of students who learn about determinants and also learn the Rule of Sarrus. A quite amusing thing which happens frequently in exams is the following (at least colleagues told me so): If you ask the students to calculate the determinant of a ${4\times 4}$ matrix there will be a number of people adopting the Rule of Sarrus without thinking, ending up with the sum of eight products. You will also find interesting discussions if you google “Sarrus 4×4”. Of course, the Rule of Sarrus can not work in this simple manner since, according to the Leibniz formula for determinants, you need a sum of 24 products.

Well, I thought it could be nice to have an illustration of the 24 “paths” along which you should take products in a ${4\times 4}$ matrix. My first idea was to you Laplace’s formula for the first column. That is, I use the formula

$\displaystyle \det(A) = \sum_{i=1}^4 (-1)^{i+1}a_{i,1}M_{i,1}$

in which ${M_{i,1}}$ is the determinant of the ${3\times 3}$ sub-matrix obtained by removing the first column and the ${i}$th row of ${A}$. For the entry ${a_{1,1}}$ this gives this picture:

Here, the green lines indicate products which get the sign ${+}$ and red lines indicate products which get the sign ${-}$. The blue dots are just for better orientation.

Similarly, the elements ${a_{2,1}}$, ${a_{3,1}}$ and ${a_{4,1}}$ lead to similar pictures:

Putting all graphics together we obtain the nice and intuitive picture

for the 4×4 Rule of Sarrus. Ok – have fun memorizing this…

Since this picture looks so ugly, one may be tempted to call the corresponding rule the “Rule of Sauron”…

P.S.: Probably there is some graph theorist somewhere who could produce a nicer picture, e.g. one which minimizes the number of crossing. Moreover, there are probably other thoughts about the Ruls of Sarrus and its interpretations for larger matrices – I would be glad to learn about them.

In a follow-up post, I show a simpler visualization.


text:
# Math Help - constructing polynomials

1. ## constructing polynomials

Qs. Write down a quadratic polynomial with a minimum value of 3 when x=2, and P(0)=15

im not looking for the answer here, i would jst realli like to no how to get there and the processes of working these kind of questions out
thanks so much for any help given =D

2. Originally Posted by THSKluv
Qs. Write down a quadratic polynomial with a minimum value of 3 when x=2, and P(0)=15

im not looking for the answer here, i would jst realli like to no how to get there and the processes of working these kind of questions out
thanks so much for any help given =D
assume
$P(x)=ax^2+bx+c$

with conditions given is problem, determine a,b,c.

3. Originally Posted by THSKluv
Qs. Write down a quadratic polynomial with a minimum value of 3 when x=2, and P(0)=15

im not looking for the answer here, i would jst realli like to no how to get there and the processes of working these kind of questions out
thanks so much for any help given =D
The standard for of a quadratic:

$a(x+\frac{b}{2a})^2-\frac{b^2}{4a}+c$

Can you see what needs to be done?

4. I like the following method better...

Use the vertex form of the quadratic:
$P(x) = a(x - h)^2 + k$
where (h, k) is the vertex. The vertex is the minimum or maximum value of the parabola, so plug (2, 3) in:
$P(x) = a(x - 2)^2 + 3$

You're also given that P(0) = 15, so plug in 0 for x and 15 for P(x), and solve for a:
$15 = a(0 - 2)^2 + 3$
...

I'm sure you can figure out the rest.

01


text:
# Some preprints published on arXiv.org

The arXiv author id for Feng Qi is http://arxiv.org/a/qi_f_1. There is also an Atom feed available from http://arxiv.org/a/qi_f_1.atom2 (authors combined, best for most current feed readers), and http://arxiv.org/a/qi_f_1.atom (authors in separate atom: author elements).

1. Feng Qi, A completely monotonic function involving the gamma and tri-gamma functions, available online at http://arxiv.org/abs/1307.5407.
2. Feng Qi, A recurrence formula for the first kind Stirling numbers, available online at http://arxiv.org/abs/1310.5920.
3. Feng Qi, A recurrence formula, some inequalities, and monotonicity related to Stirling numbers of the second kind, available online at http://arxiv.org/abs/1402.2040.
4. Feng Qi, An explicit formula for Bell numbers in terms of Stirling numbers and hypergeometric functions, available online at http://arxiv.org/abs/1402.2361.
5. Feng Qi, An explicit formula for Bernoulli numbers in terms of Stirling numbers of the second kind, available online at http://arxiv.org/abs/1401.4255.
6. Feng Qi, An explicit formula for computing Bernoulli numbers of the second kind in terms of Stirling numbers of the first kind, available online at http://arxiv.org/abs/1401.4934.
7. Feng Qi, An explicit formula for computing Bell numbers in terms of Lah and Stirling numbers, available online at http://arxiv.org/abs/1401.1625.
8. Feng Qi, An integral representation, complete monotonicity, and inequalities of Cauchy numbers of the second kind, available online at http://arxiv.org/abs/1402.2358.
9. Feng Qi, An integral representation and properties of Bernoulli numbers of the second kind, available online at http://arxiv.org/abs/1301.7181.
10. Feng Qi, An interesting identity of Lah numbers, available online at http://arxiv.org/abs/1402.2035.
11. Feng Qi, Bounds for the ratio of two gamma functions—From Gautschi’s and Kershaw’s inequalities to completely monotonic functions, available online at http://arxiv.org/abs/0904.1049.
12. Feng Qi, Bounds for the ratio of two gamma functions—From Wendel’s and related inequalities to logarithmically completely monotonic functions, available online at http://arxiv.org/abs/0904.1048.
13. Feng Qi, Bounds for the ratio of two gamma functions—From Wendel’s limit to Elezović-Giordano-Pečarić’s theorem, available online at http://arxiv.org/abs/0902.2514.
14. Feng Qi, Complete monotonicity of a function involving the gamma function and applications, available online at http://arxiv.org/abs/1104.4442.
15. Feng Qi, Completely monotonic degree of a function involving the tri- and tetra-gamma functions, available online at http://arxiv.org/abs/1301.0154.
16. Feng Qi, Complete monotonicity of a family of functions involving the tri- and tetra-gamma functions, available online at http://arxiv.org/abs/1301.0156.
17. Feng Qi, Eight interesting identities involving the exponential function, derivatives, and Stirling numbers of the second kind, available online at http://arxiv.org/abs/1202.2006.
18. Feng Qi, Explicit formulas for computing Bernoulli numbers of the second kind and Stirling numbers of the first kind, available online at http://arxiv.org/abs/1301.6845.
19. Feng Qi, Explicit formulas for computing Euler polynomials in terms of the second kind Stirling numbers, available online at http://arxiv.org/abs/1310.5921.
20. Feng Qi, Explicit formulas for the $n$-th derivatives of the tangent and cotangent functions, available online at http://arxiv.org/abs/1202.1205.
21. Feng Qi, Integral representations and complete monotonicity related to the remainder of Burnside’s formula for the gamma function, Journal of Computational and Applied Mathematics (2015), in press.
22. Feng Qi, Limit formulas for ratios of derivatives of the gamma and digamma functions at their singularities, available online at http://arxiv.org/abs/1202.4240.
23. Feng Qi, Limit formulas for ratios of polygamma functions at their singularities, available online at http://arxiv.org/abs/1202.2606.
24. Feng Qi, Properties of modified Bessel functions and completely monotonic degrees of differences between exponential and trigamma functions, available online at http://arxiv.org/abs/1302.6731.
25. Feng Qi, Properties of three functions relating to the exponential function and the existence of partitions of unity, available online at http://arxiv.org/abs/1202.0766.
26. Feng Qi, Some completely monotonic functions involving the $q$-tri-gamma and $q$-tetra-gamma functions with applications, available online at http://arxiv.org/abs/1301.0155.
27. Feng Qi and Robin J. Chapman, Two closed forms for the Bernoulli polynomials, available online at http://arxiv.org/abs/1506.02137.
28. Feng Qi, Serkan Araci, and Mehmet Açikgöz, Extended fermionic $p$-adic integrals on $\mathbb{Z}_p$, available online at http://arxiv.org/abs/1312.2040.
29. Feng Qi and Bai-Ni Guo, A class of completely monotonic functions involving divided differences of the psi and polygamma functions and some applications, available online at http://arxiv.org/abs/0903.1430.
30. Feng Qi and Bai-Ni Guo, A complete solution to an open problem relating to an inequality for ratios of gamma functions, available online at http://arxiv.org/abs/0902.2513.
31. Feng Qi and Bai-Ni Guo, A completely monotonic function involving the tri- and tetra-gamma functions, available online at http://arxiv.org/abs/1001.4611.
32. Feng Qi and Bai-Ni Guo, A concise proof of Oppenheim’s double inequality relating to the cosine and sine functions, available online at http://arxiv.org/abs/0902.2511.
33. Feng Qi and Bai-Ni Guo, A note on additivity of polygamma functions, available online at http://arxiv.org/abs/0903.0888.
34. Feng Qi and Bai-Ni Guo, A property of logarithmically absolutely monotonic functions and the logarithmically complete monotonicity of a power-exponential function, available online at http://arxiv.org/abs/0903.5038.
35. Feng Qi and Bai-Ni Guo, A short proof of monotonicity of a function involving the psi and exponential functions, available online at http://arxiv.org/abs/0902.2519.
36. Feng Qi and Bai-Ni Guo, An alternative proof of Elezović-Giordano-Pečarić’s theorem, available online at http://arxiv.org/abs/0903.1174.
37. Feng Qi and Bai-Ni Guo, An elegant refinement of a double inequality for the gamma function, available online at http://arxiv.org/abs/1001.1495.
38. Feng Qi and Bai-Ni Guo, An inequality involving the gamma and digamma functions, available online at http://arxiv.org/abs/1101.4698.
39. Feng Qi and Bai-Ni Guo, Complete monotonicity of a polygamma function plus the square of another polygamma function, available online at http://arxiv.org/abs/0904.1104.
40. Feng Qi and Bai-Ni Guo, Concise sharpening and generalizations of Shafer’s inequality for the arc sine function, available online at http://arxiv.org/abs/0902.2588.
41. Feng Qi and Bai-Ni Guo, Logarithmic convexity of Gini means, available online at http://arxiv.org/abs/0903.1208.
42. Feng Qi and Bai-Ni Guo, Monotonicity and logarithmic convexity relating to the volume of the unit ball, available online at http://arxiv.org/abs/0902.2509.
43. Feng Qi and Bai-Ni Guo, Monotonicity results and bounds for the inverse hyperbolic sine, available online at http://arxiv.org/abs/0903.1676.
44. Feng Qi and Bai-Ni Guo, Necessary and sufficient conditions for a function involving a ratio of gamma functions to be logarithmically completely monotonic, available online at http://arxiv.org/abs/0904.1101.
45. Feng Qi and Bai-Ni Guo, Necessary and sufficient conditions for a function involving divided differences of the di- and tri-gamma functions to be completely monotonic, available online at http://arxiv.org/abs/0903.3071.
46. Feng Qi and Bai-Ni Guo, Refinements of lower bounds for polygamma functions, available online at http://arxiv.org/abs/0903.1996.
47. Feng Qi and Bai-Ni Guo, Sharp bounds for harmonic numbers, available online at http://arxiv.org/abs/1002.3856.
48. Feng Qi and Bai-Ni Guo, Sharp inequalities for polygamma functions, available online at http://arxiv.org/abs/0903.1984.
49. Feng Qi and Bai-Ni Guo, Sharp inequalities for the psi function and harmonic numbers, available online at http://arxiv.org/abs/0902.2524.
50. Feng Qi and Bai-Ni Guo, Sharpening and generalizations of Carlson’s inequality for the arc cosine function, available online at http://arxiv.org/abs/0902.3495.
51. Feng Qi and Bai-Ni Guo, Sharpening and generalizations of Shafer-Fink’s double inequality for the arc sine function, available online at http://arxiv.org/abs/0902.3036.
52. Feng Qi and Bai-Ni Guo, Sharpening and generalizations of Shafer’s inequality for the arc tangent function, available online at http://arxiv.org/abs/0902.3298.
53. Feng Qi and Bai-Ni Guo, Some logarithmically completely monotonic functions related to the gamma function, available online at http://arxiv.org/abs/0903.5123.
54. Feng Qi and Bai-Ni Guo, Some properties of extended remainder of Binet’s first formula for logarithm of gamma function, available online at http://arxiv.org/abs/0904.1118.
55. Feng Qi and Bai-Ni Guo, Some properties of the psi and polygamma functions, available online at http://arxiv.org/abs/0903.1003.
56. Feng Qi and Bai-Ni Guo, The function $(b^x-a^x)/x$: Logarithmic convexity and applications to extended mean values, available online at http://arxiv.org/abs/0903.1203.
57. Feng Qi and Bai-Ni Guo, Two monotonic functions involving gamma function and volume of unit ball, available online at http://arxiv.org/abs/1001.1496.
58. Feng Qi and Bai-Ni Guo, Two new proofs of the complete monotonicity of a function involving the psi function, available online at http://arxiv.org/abs/0902.2520.
59. Feng Qi, Senlin Guo and Bai-Ni Guo, Complete monotonicity of some functions involving polygamma functions, available online at http://arxiv.org/abs/0905.2732.
60. Feng Qi and Wen-Hui Li, A logarithmically completely monotonic function involving the ratio of two gamma functions and originating from the coding gain, available online at http://arxiv.org/abs/1303.1877.
61. Feng Qi and Wen-Hui Li, Integral representations and properties of some functions involving the logarithmic function, available online at http://arxiv.org/abs/1305.4083.
62. Feng Qi and Cristinel Mortici, Some best approximation formulas and inequalities for Wallis ratio, available online at http://arxiv.org/abs/1312.3782.
63. Feng Qi and Cristinel Mortici, Some inequalities for the trigamma function in terms of the digamma function, available online at http://arxiv.org/abs/1503.03020.
64. Feng Qi and Anthony Sofo, An alternative and united proof of a double inequality for bounding the arithmetic-geometric mean, available online at http://arxiv.org/abs/0902.2515.
65. Feng Qi and Shu-Hong Wang, Complete monotonicity of a difference between the exponential and trigamma functions and completely monotonic degree of the exponential function, available online at http://arxiv.org/abs/1210.2012.
66. Feng Qi, Tian-Yu Zhang, and Bo-Yan Xi, Hermite-Hadamard type integral inequalities for functions whose first derivatives are of convexity, available online at http://arxiv.org/abs/1305.5933.
67. Feng Qi and Xiao-Jing Zhang, A Stieltjes function involving the logarithmic function and an application, available online at http://arxiv.org/abs/1301.6425.
68. Feng Qi and Xiao-Jing Zhang, Complete monotonicity of a difference between the exponential and trigamma functions, available online at http://arxiv.org/abs/1303.1582.
69. Feng Qi, Xiao-Jing Zhang, and Wen-Hui Li, A new proof of the geometric-arithmetic mean inequality by Cauchy’s integral formula, available online at http://arxiv.org/abs/1301.6432.
70. Feng Qi, Xiao-Jing Zhang, and Wen-Hui Li, Integral representations of the weighted geometric mean and the logarithmic mean, available online at http://arxiv.org/abs/1303.3122.
71. Feng Qi, Xiao-Jing Zhang, and Wen-Hui Li, Some Bernstein functions and integral representations concerning harmonic and geometric means, available online at http://arxiv.org/abs/1301.6430.
72. Feng Qi, Xiao-Jing Zhang, and Wen-Hui Li, The geometric mean is a Bernstein function, available online at http://arxiv.org/abs/1301.6848.
73. Feng Qi and Miao-Miao Zheng, Explicit expressions for a family of Bell polynomials and derivatives of some functions, available online at http://arxiv.org/abs/1404.6734.
74. Chao-Ping Chen and Feng Qi, The best bounds of harmonic sequence, available online at http://arxiv.org/abs/math/0306233.
75. Bai-Ni Guo and Feng Qi, A new explicit formula for Bernoulli and Genocchi numbers in terms of Stirling numbers, available online at http://arxiv.org/abs/1407.7726.
76. Bai-Ni Guo and Feng Qi, Alternative proofs of a formula for Bernoulli numbers in terms of Stirling numbers, available online at http://arxiv.org/abs/1401.4257.
77. Bai-Ni Guo and Feng Qi, Sharpening and generalizations of Carlson’s double inequality for the arc cosine function, available online at http://arxiv.org/abs/0902.3039.
78. Bai-Ni Guo and Feng Qi, Some bounds for the complete elliptic integrals of the first and second kinds, available online at http://arxiv.org/abs/0905.2787.
79. Bai-Ni Guo and Feng Qi, Some integral representations and properties of Lah numbers, available online at http://arxiv.org/abs/1402.2367.
80. Bai-Ni Guo and Feng Qi, The function $(b^x-a^x)/x$: Ratio’s properties, available online at http://arxiv.org/abs/0904.1115.
81. Senlin Guo and Feng Qi, More supplements to a class of logarithmically completely monotonic functions associated with the gamma function, available online at http://arxiv.org/abs/0904.4027.
82. Yun Hua and Feng Qi, A double inequality for bounding Toader mean by the centroidal mean, available online at http://arxiv.org/abs/1402.5020.
83. Yun Hua and Feng Qi, The best bounds for Toader mean in terms of the centroidal and arithmetic means, available online at http://arxiv.org/abs/1303.2451.
84. Wei-Dong Jiang and Feng Qi, Bounds for the combination of Toader mean and the arithmetic mean in terms of the contraharmonic mean, available online at http://arxiv.org/abs/1402.4561.
85. Wei-Dong Jiang and Feng Qi, Geometric convexity of the generalized sine and the generalized hyperbolic sine, available online at http://arxiv.org/abs/1301.3264.
86. Wei-Dong Jiang and Feng Qi, Sharp bounds for Neuman-Sándor’s mean in terms of the root-mean-square, available online at http://arxiv.org/abs/1301.3267.
87. Wei-Dong Jiang and Feng Qi, Sharp bounds in terms of the power of the contra-harmonic mean for Neuman-Sándor mean, available online at http://arxiv.org/abs/1301.3554.
88. Wei-Dong Jiang and Feng Qi, Some sharp inequalities involving Seiffert and other means and their concise proofs, available online at http://arxiv.org/abs/1201.6480.
89. Valmir Krasniqi and Feng Qi, Complete monotonicity of a function involving the $p$-psi function and alternative proofs, available online at http://arxiv.org/abs/1105.4928.
90. Wen-Hui Li and Feng Qi, A unified proof of inequalities and some new inequalities involving Neuman-Sándor mean, available online at http://arxiv.org/abs/1312.3500.
91. Wen-Hui Li and Feng Qi, Hermite-Hadamard type inequalities of functions whose derivatives of $n$-th order are $(\alpha,m)$-convex, available online at http://arxiv.org/abs/1308.2948.
92. Cristinel Mortici and Feng Qi, Asymptotic formulas and inequalities for gamma function in terms of tri-gamma function, available online at http://arxiv.org/abs/1312.5881.
93. Bo-Yan Xi and Feng Qi, Inequalities of Hermite-Hadamard type for extended $s$-convex functions and applications to means, available online at http://arxiv.org/abs/1406.5409.
94. Li Yin and Feng Qi, Some inequalities for complete elliptic integrals, available online at http://arxiv.org/abs/1301.4385.
95. Li Yin and Feng Qi, Some integral inequalities on time scales, available online at http://arxiv.org/abs/1105.1566.
96. Praveen Agarwal, Mohamed Jleli, and Feng Qi, Extended Weyl fractional integrals and their inequalities, arXiv preprint (2017), available online at https://arxiv.org/abs/1705.03131.
97. Serkan Aracı, Mehmet Açikgöz, and Feng Qi, On the $q$-Genocchi numbers and polynomials with weight zero and their applications, available online at http://arxiv.org/abs/1202.2643.
98. Serkan Aracı, Mehmet Açikgöz, Feng Qi, and Hassan Jolany, A note on the modified $q$-Genocchi numbers and polynomials with weight $(\alpha,\beta)$ and their interpolation function at negative integers, available online at http://arxiv.org/abs/1112.5902.
99. Bai-Ni Guo, István Mező, and Feng Qi, An explicit formula for Bernoulli polynomials in terms of $r$-Stirling numbers of the second kind, available online at http://arxiv.org/abs/1402.2340.
100. Ai-Ping Ji, Tian-Yu Zhang, and Feng Qi, Integral inequalities of Hermite-Hadamard type for $(\alpha,m)$-GA-convex functions, available online at http://arxiv.org/abs/1306.0852.
101. Wei-Dong Jiang, Jian Cao, and Feng Qi, Two sharp inequalities for bounding the Seiffert mean by the arithmetic, centroidal, and contra-harmonic means, available online at http://arxiv.org/abs/1201.6432.
102. Wei-Dong Jiang, Qiu-Ming Luo, and Feng Qi, Refinements and sharpening of some Huygens and Wilker type inequalities, available online at http://arxiv.org/abs/1201.6477.


text:
# Loop Models in 2d Statistical Mechanics

### Loop Models in 2d Statistical Mechanics

Series: Mathematics Colloquium
Location: Math 501
Presenter: John Cardy, UC Berkeley and University of Oxford

Many 2d planar lattice models may be realized as random non-intersecting nested loops. In the $O(n)$ model, each loop has a weight given by a real positive number $n$. These weights are non-local and one may ask whether there is a local updating algorithm to simulate such an ensemble. The answer is yes, if $n=2\cos(\pi/m)$ with $m$ an integer $\geq3$. At the critical point the scaling limit of this loop gas is called the Conformal Loop Ensemble, and I shall discuss some if its known and conjectured properties.

Refreshments in Math Commons Room at 3:30pm


text:
## Polynomial Curve

A curve obtained by fitting Polynomials to each ordinate of an ordered sequence of points. The above plots show Polynomial curves where the order of the fitting Polynomial varies from to , where is the number of points.

Polynomial curves have several undesirable features, including a nonintuitive variation of fitting curve with varying Coefficients, and numerical instability for high orders. Splines such as the Bézier Curve are therefore used more commonly.


text:
# Clustering with asymmetrical distance measures

How do you cluster a feature with an asymmetrical distance measure?

For example, let's say you are clustering a dataset with days of the week as a feature - the distance from Monday to Friday is not the same as the distance from Friday to Monday.

How do you incorporate this into the clustering algorithm's distance measure?

## 4 Answers

If the M-F distance is asymmetric because the future is different from the past, then a genuine asymmetric clustering is called for. First, an asymmetric distance function must be defined.

One way to to asymmetric clustering, given a distance function, is to embed the original data into a new coordinate space. See "Geometrical Structures of Some Non-Distance Models for Asymmetric MDS" by Naohito Chino and Kenichi Shiraiwa, Behaviormetrika, 1992 (pdf). This is called HCM (the Hermitian Canonical Model).

Find a Hermitian matrix $H$, where $$H_{ij} = \frac 1 2 [d(x_i, x_j) + d(x_j, x_i)] + i \frac 1 2 [d(x_i, x_j) - d(x_j, x_i)]$$ Find the eigenvalues and eigenvectors, then scale each eigenvector by the square root of its corresponding eigenvalue.

This transforms the data into a space of complex numbers. Once the data is embedded, the distance between objects x and y is just x * y, where * is the conjugate transpose. At this point you can run k-means on the complex vectors.

Spectral asymmetric clustering has also been done, see the thesis by Stefan Emilov Atev, "Using Asymmetry in the Spectral Clustering of Trajectories," University of Minnesota, 2011, which gives MATLAB code for a special algorithm.

You can take some sort of a mean (like an arithmetic mean or, for probability distributions, the square root of the Jensen–Shannon divergence.)

You should have a look to circular statistics (if you want to work "within"a tunning week)

If your distance function is not a valid Mercer kernel, then $X \neq X^T$, where $X$ is the Gram matrix. In this case want co-clustering, also called bi-clustering. Algorithms of this class produce cluster indicators simultaneously for the rows and columns.

The example you gave is the result of a poorly chosen distance metric. A better distance metric would be $|\text{days apart}|$

Generally your distance function should be a valid Mercer kernel. A valid Mercer kernel is any function taking two observations that is continuous, symmetric and has a positive definite covariance matrix $\forall x \in D$.


text:
## Thursday, March 26, 2009

### Buffer vs. Array

To clear up any misconceptions, System.Array.Copy is not the same as System.Buffer.BlockCopy unless you're operating on arrays of System.Byte. The Buffer class copies bytes from one array to another. If you have an array of System.Int32 (4 bytes each) and you copy 3 bytes (not items) from your source to your destination array, you will just get the first 3 bytes of your 4 byte System.Int32. Depending on the endian-ness of your system, this could give you different results. Also, the System.Buffer class only works on primitives. Not C# primitives (which include strings) and not even derivatives of System.ValueType (e.g. enums and your own structs). Clearly it can't work on reference types safely (imagine just copying 3 of the 4 bytes from one object reference to another) but I would have expected it to work with enumerations (essentially ints).

## Monday, March 23, 2009

### Hello Python

>>> def reverse(value): if len(value) > 1:  return value[len(value) - 1] + reverse(value[:len(value) - 1]) else:  return value[0] >>> print reverse('!dlroW ,olleH')Hello, World!

### System.OutOfMemoryException Part 4

And then there were 2. I'm talking about code paths that lead to an OutOfMemoryException being thrown by the CLR.

#1 is the standard "You've run out of contiguous virtual memory, sonny boy!", which is pretty easy to do in a 32-bit process. With the advent of 64-bit operating systems, you get a little more headroom. Actually, a lot more headroom: precicely 2^32 times as much as you had to start with! But, due to limitations built into the CLR, you're no further from an OutOfMemoryException...

#2 is when you try and allocate more than 2GiB in a single object. In the following example, it's the +1 that pushes you over the edge:
new System.Byte[System.Int32.MaxValue + 1];
If you're using a different ValueType your mileage may vary:
new System.Int32[(Ssytem.Int32.MaxValue / sizeof(System.Int32.MaxValue)) + 1];
Or if you're on a 64-bit system:
new System.IntPtr[(System.Int32.MaxValue / sizeof(System.Int64)) + 1];

Many thanks to this blog for helping me in the right direction here.

### Hopscotch in the 64-bit Minefield

So it's no secret I've been playing with virtualization, Windows, Linux, IA32 and amd64. Virtualization looks the part, but so does a 24-bit color depth 1280 x 1024 bitmap of a fake desktop. You can't do much with either.

Microsoft has given us WOW64, allowing us to run old x86 (IA32) software on new 64-bit operating systems. It's so seamless you forget you've got it: until you try and install ISA Server 2006.

Getting Windows Hyper-V Server up and running on a headless box... well, let's just say I'm not that patient. I eventually settled for Hyper-V role on a full-fat Windows Server 2008 Enterprise Edition install, with crash-carted DKM. It doesn't appear to run on anything except the 64-bit version, either. Even then, loads of caveats await:
gigabit network card? you'll have to use a ridiculously slow emulated "switch" instead.
multiple cpus? not!
scsi drives? think again.
usb? umm... for some reason nobody in the world has ever thought of plugging a usb device into a server. i was the first. i'm so proud!
Granted, all these restrictions are imposed on the non-MS (see ubuntu) and older guest operating systems like Windows XP, but isn't half the pitch behind virtualization about getting rid of old physical kit and consolidating servers?

Flex Builder 3? Oh yes. But not for Linux. No wait... there's a free alpha version but it's not compatible with 64-bit.

VMWare ESXi? Check your hardware list first.

## Saturday, March 21, 2009

### Debug Enable!

All wireless functions on my O2 wireless box II appear to have died overnight. This is a problem for me because I use wireless all the time... to stream music to my Apple TV, to surf the Internet from my laptop, and play games on my iPod Touch. The wired ethernet is still happily routing packets between my LAN and the Internet. So I climbed up in my cupboard and pulled down the old Netgear DG834G - what a beautiful beast. It runs BusyBox, an embedded Linux operating system and you can connect to it using any telnet client. Just navigate to http://<netgear-router>/setup.cgi?todo=debug from your browser first, and you're A for Away - you can then telnet into it. Reboot the rooter when you're finished to disable the telnet server until next time.

Things that frustrated me:
There was no way to change the default gateway address handed out by either router. I suspect I could have done so with the Netgear box in time, but there is no text editor in the distribution.

To get my network back up and running would be difficult without the usual trance music coming through the Apple TV; keeping me focused. Still, I needed to:

1. put both routers onto the same subnet
2. keep DHCP running on the O2 box (so that the default gateway would remain the O2 box address)
3. turn off DHCP on the Netgear box (otherwise it would give out its own IP address as default gateway)
4. turn off the wireless interface on the O2 box for good

In a nutshell:
o2wirelessbox is now 192.168.1.254/24 with DHCP handing out addresses in the range 64-253
netgear is now 192.168.1.1/24 with disabled DHCP (I would have liked to use the range 2-63)

## Wednesday, March 11, 2009

### Gigabit Ethernet

... is actually quite fast. So fast - in fact - that the bottleneck on both PCs under my desk is currently the PCI bus into which the network cards are plugged. I had no idea that the bus ran at 33MHz and was only be able to transfer 32 bits per cycle (math says: 33M * 32b = 1056Mb). Todo: is this duplex?

There's a very useful FAQ regarding Gigabit Ethernet available here.

In a test with 4 network cards (2 in each machine) I saw the following:

w) 1A -> 2C (93Mb/s)
x) 1A -> 2D (902Mb/s)
y) 1B -> 2C (93Mb/s)
z) 1B -> 2D (294Mb/s)

1A: Gigabit embedded on motherboard (1000 link at switch)
1B: Gigabit on PCI bus (1000 link at switch)
2C: Fast embedded on motherboard ( 100 link at switch)
2D: Gigabit on PCI bus (1000 link at switch)

Machine 1 was sending large UDP datagrams. Machine 2 was not listening, it was just up so that ARP could get the MAC addresses of its adapters (without which, we could not send a datagram).

Interestingly:
tests w + y appeared to be throttled by the router as it managed a mixed 100/1000 route
test x was great and showed that an onboard gigabit controller can actually do its job
test z showed the PCI bus being the bottleneck, allowing 3x faster than Fast, but 3x slower than Gigabit.

## Saturday, March 07, 2009

### Extellect Utilities

I've finally put a set of C# productivity classes on Google Code under the Apache 2.0 License. So, check 'em out, see if they make your work any easier, and let me know what you think.

### Remoting, bindTo and IPAddress.Any

Just solved a fun problem. While running a .NET remoting server on my ubuntu box with multiple NICs I saw some strange behavior where the server would return an alternate IP address, and the client would attempt to re-connect (using a new Socket) to the new IP address. Problem being: the server was responding with its localhost address (127.0.1.1), which the client was resolving to its own loopback adapter. See the problem yet?

It turns out that in the absence of a specific binding, the server binds to IPAddress.Any. When a client attempts to connect, it's redirected to the server's bound address. Unless client and server are hosted on the same physical machine, there's really no point in ever using the loopback adaptor... which makes it a strange choice for default.

The solution:
Before you create and register your TcpServerChannel, you need to set some options.
IDictionary properties = new Hashtable();properties["bindTo"] = "dotted.quad.ip.address";properties["port"] = port;IChannel serverChannel = new TcpServerChannel(properties, new BinaryServerFormatterSinkProvider());RemotingConfiguration.RegisterWellKnownServiceType(typeof(Explorer), "Explorer.rem", WellKnownObjectMode.SingleCall);

Voila! 'appiness should ensue...

PS. If for some reason the dotted quad doesn't appeal to your particular situation (e.g. load balancing), you can set two other properties instead:
properties["machineName"] = "load.balanced.server.name";properties["useIpAddress"] = false;

PPS. I think the client will make always two socket connections, A + B. A is used at the start to do some initialization and get the address for connection B. B is used for meat and bones of the operation, and finally A is used just before they're both closed.

## Friday, March 06, 2009

### Goodput - Season Finale

I thought I'd take a look at a couple of different (and by no means an exhaustive list of) options for transferring a reasonably large file across a network. Over the past couple of days I tried sending a 700MB DivX using the .NET Remoting API (over both TCP and HTTP), the .NET Sockets API (over TCP), and finally using a mounted network share, reading the file as if it was local.

The table that follows shows the results of these tests:

I'd advocate taking pinch of salt when interpreting the numbers.

In general, remoting doesn't support the C# compiler generated closures it emits when it compiles an iterator block (e.g. the yield return keyword): quickly remedied by exposing the IEnumerator<T> as a remote MarshalByRefObject itself, wrapping the call to the iterator block. This gave us a nice looking (easy to read) interface, but will have increased the chattiness of the application, as every call to MoveNext() and Current would have required a network call. Further to this, the default SOAP serialization used with HTTP remoting doesn't support generic classes, so I had to write a non-generic version of my Streamable<T> class.

The performance of the HTTP/SOAP remoting was abysmal and there was very little gain by switching to a faster network. Even with what I suspect to be a massively chatty protocol (mine, not theirs), the bottleneck was probably somewhere else.

TCP remoting was next up. Under the covers it will have done all the marshalling/unmarshalling on a single TCP socket, but the chatty protocol (e.g. Current, MoveNext(), Current, MoveNext() etc.) probably let it down. TCP/Binary remoting's performance jumped 2.5x when given a 10x faster network, indicating some other bottleneck as it still used just 16% of the advertised available bandwidth.

CIFS was pretty quick, but not as quick as the System.Net.Sockets approach. Both used around 30% of the bandwidth on the Gigabit tests, indicating that some kind of parallelism might increase the utilization of the network link. An inverse-multiplexer could distribute the chunks evenly (round-robin) over 3 sockets sharing the same ethernet link, and a de-inverse-multiplexer (try saying that 10 times faster, after a couple of beers) could put them together.

Back on track...

Seeing as TCP/Binary remoting was the problem area that drove me to research this problem, I thought I'd spend a little more time trying to optimise it - without changing the algorithm/protocol/interface - by parameterizing the block size. The bigger the block size, the fewer times the network calls MoveNext() and get_Current have to be made, but the trade-off is that we have to deal with successively larger blocks of data.

What the numbers say: transmission rate is a bit of an upside down smile; at very low block sizes the algorithm is too chatty, at 4M it's at its peak, and beyond that something else becomes the bottleneck. At the 4M peak, the remote iteration invocations would only have been called 175 times, and the data transfer rate was 263Mb/s (roughly 89% of the observed CIFS' 296Mb/s).

## Thursday, March 05, 2009

### Full Duplex

Simple english: if two computers are connected by a full duplex ethernet link, then they should be able to carry out two conversations with each other simultaneously. For example, imagine two computers named A and B with a 100Mb/s full-duplex connection linking them both. A starts "talking" at 100Mb/s and B "listens". B also starts "talking" at 100Mb/s and A "listens". The total data moving up and down the link 200Mb/s. That's full duplex, baby!

Only, in real life you don't get the full 100Mb/s in either direction. On my PC, I managed to get 91Mb/s in one direction and 61Mb/s in the other direction. If I stopped the 91Mb/s conversation (call it X), the 61Mb/s conversation (call it Y) would quickly use up the extra bandwidth, becoming a 91Mb/s conversation itself. As soon as I restarted X, it reclaimed its original 91Mb/s, and Y returned to its original 61Mb/s. Freaky.

### Goodput - Part 2

So then I thought to myself, "Hey, you have two NICs in each machine. Why don't you try and get double the throughput?" Even though all my NICs are gigabit ethernet, my modem/router/switch is only capable of 10/100 (a gigabit switch is in the post, as I type). Yesterday's tests indicated that I was getting roughly 89Mb/s, so I'd be aiming for 178Mb/s with my current hardware setup. And a glorious (hypothetical) 1.78Gb/s when the parcel arrives from amazon.co.uk.

What would have to change? For starters, the server was binding one socket to System.Net.IPAddress.Any; we'd have to create two sockets and bind each one to its own IP address. Easy enough. The client would also have to connect to one of the the two new server IP addresses.

Wait a minute... there isn't any System.Net.Sockets option on the client side to specify which ethernet adapter to use. You only specify the remote IP address. Oh no! This means we could end up sending/receiving all the data through just one of the client's NICs. Luckily, you can modify the routing table so that all traffic to a particular subnet can be routed via a specific interface. I'm using ubuntu as the client, and my routing table looks like this, which indicates that eth0 would get all the traffic to my LAN:

Destination Gateway Genmask Flags Metric Ref Use Iface192.168.1.0 * 255.255.255.0 U 1 0 0 eth0192.168.1.0 * 255.255.255.0 U 1 0 0 eth1

I want to add a static route, with higher precedence than the LAN subnet, using eth1 for all communication with the remote IP 192.168.0.73, leaving eth0 with the traffic for the rest of the 192.168.1.0/24 subnet. I type this command at the console:

sudo route add -net 192.168.1.73 netmask 255.255.255.255 dev eth1

Disaster averted. The routing table now looks like this, and I'm happy to say my diagnostics report that I'm getting around 170Mb/s with my new trick in place. It's not the 178Mb/s I was hoping for (I've lost about 4.5% on each connection), but it's still 190% of the original throughput.

Destination Gateway Genmask Flags Metric Ref Use Iface192.168.1.73 * 255.255.255.255 UH 0 0 0 eth1192.168.1.0 * 255.255.255.0 U 1 0 0 eth0192.168.1.0 * 255.255.255.0 U 1 0 0 eth1

Throughput comparison reading a 700MB DivX file:
73Mb/s - Mounted network share using CIFS (although it also appeared to be caching the file on disk, incurring disk write penalties)
89Mb/s - 1x NIC using System.Net.Sockets
170Mb/s - 2x NIC using System.Net.Sockets

### Goodput - Part 1

I've been interested recently in maximizing the application-level throughput of data across networks. The word I didn't know I was looking for - but found anyway - was goodput.

At first I tried streaming across a large DivX file. When I realised that I might be measuring disk seek time (doubtful, at the pitiful data rates I was achieving) I transitioned my tests to stream meaningless large byte arrays directly from memory (being careful not to invoke the wrath of the garbage collector, or any of the slow operating system-level memory functions).

What I noticed was that the application-level control of the stream was a big factor in slowing down the effective data transfer rate. In short, if my design of the logical/physical stream protocol was "bad", so would be the goodput.

Throughout the test, data was transmitted in chunks of varying sizes (from 4k to 128k). Firstly, just to see what it was like, I tried establishing a new System.Net.Socket connections for each chunk. Not good. This is why database connection pooling has really gained ground. It's expensive to create new connections. Next I tried a single connection where the client explicitly requested the next chunk. Also really bad. It was chatty like an office secretary, and got less done. So I tried a design I thought would be pretty good, where 1 request resulted in many chunks being returned. For some reason, I thought that prepending each chunk with its size would be a good idea. It was 360% better than the previous incarnations, but the extra size information was just repeating data that wasn't at all useful to the protocol I had devised: it was wasting bits and adding extra CPU load, and giving nothing in return; it had to go. Stripping these items from the stream resulted in an extra 3.6% of throughput.

Interestingly, I noticed that the choice of buffer size could drastically affect the goodput, especially when it was ((1024*128)+4) bytes. I expect this was something to do with alignment. It would be cool to do some more tests, looking for optimal buffer sizes.


text:
# Problem 3.62, Young and Freedman-On the Flying Trapeze

1. Jan 26, 2009

### james brug

Problem 3.62, Young and Freedman--On the Flying Trapeze

A new circus act is called the Texas Tumblers. Mary Belle swings from a trapeze, projects herself at an angle of 53 degrees, and is supposed to be caught by Joe Bob whose hands are 6.1m above and 8.2 horizontally from her launch point. You can ignore air resistance.

(a) What initial speed $$V_o$$, must Mary Belle have just to reach Joe Bob?

(b) For the initial speed calculated in part a, what are the magnitudes and direction of her velocity when Mary reaches Joe?

My attempt at a solution

(a) $$V_y^2=V_{0y}^2+2a_y(y-y_0)$$

$$-V_{0y}^2=-19.6m/s^2(6.1m)$$ set $$V_y$$ equal to 0

$$V_{0y}=10.93m/s$$ initial y velocity

$$tan(53^{\circ}) =\frac{10.93}{x} \rightarrow x= 8.24 m/s$$ x velocity

magnitude=13.7 m/s

Mastering Physics says these values should be 14m/s,11.2 m/s, and 8.4m/s.

(b) The magnitude according to Mastering Physics is 8.4m/s, which is also her x-velocity component, $$V_x$$. This means that Mary Joe is at the top of her parabolic trajectory, where her y-velocity, $$V_y$$ is 0, right?.

2. Jan 26, 2009

### Gib Z

Re: Problem 3.62, Young and Freedman--On the Flying Trapeze

Well, I got the same values as you did, and to your (b), yes. I guess the textbook just got it wrong.


text:
# Proving a function is greater than zero (1 Viewer)

### Users Who Are Viewing This Thread (Users: 0, Guests: 1)

#### Buri

The problem statement, all variables and given/known data

I'd like to show that:

f(x,y) = x^p/p + y^q/q - xy ≥ 0 where 1/q + 1/p = 1 and x ≥ 0 and y ≥ 0.

The attempt at a solution

What I'm actually trying to do is show that the minimum is on the line x = y^(q-1) at which the function takes on 0. But proving its actually always ≥ 0 is something that's causing me problems. Is there some inequality that could maybe lead me to a solution? I've tried considering lines in the plane like y = kx, but that doesn't lead me to anywhere. Any help?

#### micromass

We first take x fixed and we consider the function

$$h(y)=\frac{x^p}{p}+\frac{y^q}{q}-xy$$

The derivative of this function

$$h^\prime(y)=y^{q-1}-x$$

So the minimum of h is in in (q-1)th root of x. So all we need to prove is that

$$h(\sqrt[q-1]{x})=\frac{x^p}{p}+\frac{x^{\frac{q}{q-1}}}{q}-x^{\frac{q}{q-1}}=\frac{x^p}{p}-\frac{q-1}{q}x^{\frac{q}{q-1}}}$$

is positive. But since 1/p+1/q=1, we get that the above is equal to 0, and thus always positive.

It could be that I miscalculated somewhere, but I do think that this would be the technique to proving the inequality...

#### Buri

I've worked through it all and it doesn't seem like you did any miscalculations. Is it perfectly sound though? I don't know, but considering the single variable function is something I'm a bit iffy about (I'd think twice about it), but maybe it's just something clever to do.

### The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving