## Search found 97 matches

- Thu Dec 18, 2014 12:50 pm UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

So, I went to talk with the professor this morning and he pointed me in the right direction. Turns out you guys were right and I didn't really grasp the complete scope of the problem. I've now written a recursive formula which actually works, so for anyone who's interested: http://i.imgur.com/ODYNLp...

- Wed Dec 17, 2014 9:14 pm UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

I think I understand now. I've written a recursive formula which finds the minimal costs of bundling updates i to n. To be honest, I don't think you do understand because what you have written seems to bear little resemblance to what phlip and I have described. Can you describe exactly what your fo...

- Wed Dec 17, 2014 3:18 pm UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

I think I understand now. I've written a recursive formula which finds the minimal costs of bundling updates i to n. Now, if I understand correctly, finding the minimum cost of all updates, is just applying this formula for every n, memoizing the output and then finding the minimum, right? C = cost ...

- Wed Dec 17, 2014 10:53 am UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

I see what you mean, if you already know the optimal bundling of all the updates before the last bundling, you only need to compute the optimal bundling for the remaining updates. Nearly, but you are still making it too complicated. What I'm hinting at depends on this fact: If you had an optimal bu...

- Wed Dec 17, 2014 9:30 am UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

I see what you mean, if you already know the optimal bundling of all the updates before the last bundling, you only need to compute the optimal bundling for the remaining updates. Edit: Ok, I'm going expand a little on my progress here. I've constructed a table which gives the cost of bundling updat...

- Tue Dec 16, 2014 10:52 pm UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Re: Dynamic programming

I'm guessing you're talking about memoization? The thing is, I'm having trouble translating the concept to actual code. Though, I've been working on this problem for 16 consecutive hours now, so I might be a bit dim. Anyway, suppose you have four updates, then there are already quite a lot of ways t...

- Tue Dec 16, 2014 7:52 pm UTC
- Forum: Computer Science
- Topic: Dynamic programming
- Replies:
**13** - Views:
**6187**

### Dynamic programming

Hi guys, I'm doing a CS course on algorithm design and the topic currently being treated is dynamic programming. For this topic, we have to do this assignment: http://i.imgur.com/nuBgPNn.png The thing is, I'm having an extremely hard time figuring out how to tackle this assignment, I've been trying ...

- Wed Jun 11, 2014 8:27 pm UTC
- Forum: Science
- Topic: Some questions about thermodynamics
- Replies:
**0** - Views:
**1918**

### Some questions about thermodynamics

Hey guys, I'm taking a thermodynamics class for which I have to hand in homework. Since the homework counts towards your final grade, I was hoping one of you could perhaps check my answers and give me pointers if I fucked up somewhere. The melting point of ethylene glycol is 261.5K. Its density is 1...

- Tue Feb 26, 2013 5:37 pm UTC
- Forum: Science
- Topic: Need some thermodynamics help
- Replies:
**4** - Views:
**1418**

### Re: Need some thermodynamics help

I'm confused, why is the last term negligible? As I see it, the last term yields around 3kJ. Obviously I'm missing a factor 1000 somewhere, but I can't see quite where... Using your values, the molar volume is (.061 kg/mol) / (1.188 kg/dm^3) = 0.051 dm^3/mol = 0.000051 m^3/mol . \Delta p = 6x10^4 P...

- Tue Feb 26, 2013 4:30 pm UTC
- Forum: Science
- Topic: Need some thermodynamics help
- Replies:
**4** - Views:
**1418**

### Re: Need some thermodynamics help

So I'm trying to solve this question: Of a hypothetical fluid the standard Gibbs formation energy is 69.2 kJ/mol, the standard entropy is 437.2 J/(K mol), the molar mass is 61 g/mol and the density is 1.188 kg/dm^3. Calculate the Gibbs energy (in kJ/mol) at 34 C and 1.6 bar and this was my approach...

- Tue Feb 26, 2013 1:24 pm UTC
- Forum: Science
- Topic: Need some thermodynamics help
- Replies:
**4** - Views:
**1418**

### Need some thermodynamics help

So I'm trying to solve this question: Of a hypothetical fluid the standard Gibbs formation energy is 69.2 kJ/mol, the standard entropy is 437.2 J/(K mol), the molar mass is 61 g/mol and the density is 1.188 kg/dm^3. Calculate the Gibbs energy (in kJ/mol) at 34 C and 1.6 bar and this was my approach:...

- Thu Sep 27, 2012 11:04 am UTC
- Forum: Coding
- Topic: Why is my integral not entirely accurate?
- Replies:
**25** - Views:
**6737**

### Re: Why is my integral not entirely accurate?

Excellent. You're doing pretty well for someone who's only had 4 lectures. Have you learned any other languages before Java? Well, I've worked with python and php (not the best language to start with, I know) for several years, so I'm familiar with the basic syntax and coding practices. Stuff like ...

- Wed Sep 26, 2012 12:22 pm UTC
- Forum: Coding
- Topic: Why is my integral not entirely accurate?
- Replies:
**25** - Views:
**6737**

### Re: Why is my integral not entirely accurate?

First: odd that you weren't allowed to use Math.sqrt, but were allowed to use other Math functions... Agreed. However, there is one more potential source of errors: the way you've built the loop in rie_sum can suffer from the same rounding errors... if you repeatedly add, say, 0.1 to a variable, ro...

- Wed Sep 26, 2012 7:55 am UTC
- Forum: Coding
- Topic: Why is my integral not entirely accurate?
- Replies:
**25** - Views:
**6737**

### Re: Why is my integral not entirely accurate?

First: odd that you weren't allowed to use Math.sqrt, but were allowed to use other Math functions... But yeah, doing it this more complicated way is going to give you a less-accurate result, but not to an extent that will be causing what you're seeing here. What you're seeing here is actually pret...

- Tue Sep 25, 2012 9:29 pm UTC
- Forum: Coding
- Topic: Why is my integral not entirely accurate?
- Replies:
**25** - Views:
**6737**

### Re: Why is my integral not entirely accurate?

Um, what? private static double f(double x) { x = Math.pow(Math.E, (Math.log(x)*0.5)); return x; } So, the thing about duobles is that they are floating point values. The more strange things you do to them, the less well they behave, and the more errors accumulate in them. Does that look like the e...

- Tue Sep 25, 2012 6:37 pm UTC
- Forum: Coding
- Topic: Why is my integral not entirely accurate?
- Replies:
**25** - Views:
**6737**

### Why is my integral not entirely accurate?

Ok, so I'm working on the following java assignment: Create a class and call it Assignment3_2. Write a method 'f' and a method 'integral' which comply to the following specifications: f(x : double) : double returns the squareroot of x integral(start : double, end : double, res : double) : double ret...

- Wed Sep 12, 2012 2:33 pm UTC
- Forum: Mathematics
- Topic: Finding the coordinates of a point?
- Replies:
**5** - Views:
**1488**

### Re: Finding the coordinates of a point?

The way I would do it (possibly wrong or at least the wrong way to do it) is by imagining a new right angled triangle ACD, in which D shares the y coordinate of A and the x coordinate of C, and the hypotenuse is AC. From what you have there you can work out length AC, and if you the gradient (and t...

- Wed Sep 12, 2012 2:00 pm UTC
- Forum: Mathematics
- Topic: Finding the coordinates of a point?
- Replies:
**5** - Views:
**1488**

### Finding the coordinates of a point?

So I'm working on a programming assignment and I'm having a little trouble with it. I was hoping you guys could help me out. http://img840.imageshack.us/img840/9448/problemp.gif (A part) of the assignment is to calculate the coordinates of point C, using the coordinates of A and B (which are known) ...

- Sun Aug 26, 2012 3:05 pm UTC
- Forum: Mathematics
- Topic: Differentiate with respect to log(a)?
- Replies:
**3** - Views:
**1414**

### Differentiate with respect to log(a)?

So I'm studying for my biochemical dynamics exam, and I came across the equation below. I've looked EVERYWHERE on the internet, but I couldn't find a solution, or even a method anywhere. Could one of you math geniuses tell me if what I did is correct? \frac{\delta log(1+a(k_1+k_2)+k_1k_2...

- Fri Aug 17, 2012 5:00 pm UTC
- Forum: Mathematics
- Topic: Some help with reversing the order of integration
- Replies:
**3** - Views:
**1023**

### Re: Some help with reversing the order of integration

Everything looks good up until you write out the very last set of integrals. (See edit below!) You just need to be more careful about writing down everything. You want to make the y's come first, so you need to have actual numbers as your integral limits. Well, what's the smallest value that y take...

- Thu Aug 16, 2012 7:42 pm UTC
- Forum: Mathematics
- Topic: Some help with reversing the order of integration
- Replies:
**3** - Views:
**1023**

### Some help with reversing the order of integration

So I'm practicing for a calculus exam and I'm having a bit of trouble with an assignment, I was hoping one of you fine gents could help me out. Q: Given is the integral \int\int_{R}fdA = \int^0_{-2}\int^{6+2x}_{\sqrt{x+6}}f dydx + \int^3_{0}\int^{6-x}_{\sqrt{x+6}}f dydx a. Create a drawing of the re...

- Thu Jul 19, 2012 12:21 pm UTC
- Forum: Science
- Topic: Calculating Boyle temperature with 2nd Virial coefficient
- Replies:
**3** - Views:
**1888**

### Re: Calculating Boyle temperature with 2nd Virial coefficien

jaap wrote:Liter is not an SI unit. It should be in cubic metres, m^3. Everything else looks fine to me (except that you wrote B instead of b in the formula you derived).

Well, if everything is in Liter, shouldn't it then cancel itself out?

- Thu Jul 19, 2012 11:43 am UTC
- Forum: Science
- Topic: Calculating Boyle temperature with 2nd Virial coefficient
- Replies:
**3** - Views:
**1888**

### Calculating Boyle temperature with 2nd Virial coefficient

I'm making some thermodynamics assignments and I can't for the life of me figure out this one, it's extremely frustrating and I'd be really glad if someone could point out what I'm doing wrong. Q: Of a gas the virial coefficient is defined as B2 = b - a /(RT) with a = 1.669 bar L 2 /mol 2 and b = 0....

- Sat Jul 07, 2012 8:49 pm UTC
- Forum: Science
- Topic: A question about nitrogen
- Replies:
**6** - Views:
**3902**

### Re: A question about nitrogen

Hi, I'm studying for an organic chemistry exam and I've run into something I can't quite understand. Literally everywhere in my book and online it says that "N has five valence electrons", so going by the octet rule of thumb, nitrogen should be able to form three covalent bonds, however w...

- Sat Jul 07, 2012 2:44 pm UTC
- Forum: Science
- Topic: A question about nitrogen
- Replies:
**6** - Views:
**3902**

### A question about nitrogen

Hi, I'm studying for an organic chemistry exam and I've run into something I can't quite understand. Literally everywhere in my book and online it says that "N has five valence electrons", so going by the octet rule of thumb, nitrogen should be able to form three covalent bonds, however wh...

- Tue Jun 05, 2012 2:43 pm UTC
- Forum: Science
- Topic: Creating a Synthetic Bestiary
- Replies:
**1** - Views:
**1082**

### Re: Creating a Synthetic Bestiary

The first transgenic bull on earth: http://en.wikipedia.org/wiki/Herman_the_Bull

- Fri Jan 06, 2012 12:39 pm UTC
- Forum: Science
- Topic: Why aren't there any viruses that block MHC class I?
- Replies:
**3** - Views:
**1337**

### Why aren't there any viruses that block MHC class I?

So I'm studying for an immunology exam and I was wondering why there are no infectious diseases that block MHC class I? It seems to me that it would not be very hard for a virus to do and by doing so it would make itself undetectable, because there won't be any antigen for CD8 T cells to contact wit...

- Thu Oct 27, 2011 9:30 pm UTC
- Forum: Science
- Topic: One thing that has always bugged me about evolution.
- Replies:
**48** - Views:
**8256**

### One thing that has always bugged me about evolution.

So we all know the fundamental thought behind the evolution theory: Random mutations occur in individuals which are then selected for or against by natural selection, mutations that result in favorable traits get passed on to the next generation. I may have formulated it a bit awkward, but you get t...

- Mon Oct 17, 2011 2:09 pm UTC
- Forum: The Help Desk
- Topic: speaker wire to tulip plug
- Replies:
**4** - Views:
**3034**

### speaker wire to tulip plug

Hi, I'm thinking of buying a subwoofer for my sound setup and I came across a cheap philips SW986 Bass reflex subwoofer, the only problem is that it only has a tulip connection on the back and that the amp (A kenwood KA-550, old but it works) which directs the rest of my setup has only standard spea...

- Sat Oct 01, 2011 6:06 pm UTC
- Forum: Science
- Topic: How Does A Bike Work?
- Replies:
**20** - Views:
**4607**

- Fri Sep 02, 2011 5:55 pm UTC
- Forum: The Help Desk
- Topic: 3.5mm audio jack to 5.1 speakers set?
- Replies:
**3** - Views:
**3273**

### Re: 3.5mm audio jack to 5.1 speakers set?

When you say a 5.1 speaker set, what kind of speakers are they and does that include an amp? Either way, you may or may not find that your lineout is high enough quality, in which case some sort of USB sound card to the appropriate socket is probably the easiest solution. As long as you know that y...

- Fri Sep 02, 2011 5:37 pm UTC
- Forum: The Help Desk
- Topic: 3.5mm audio jack to 5.1 speakers set?
- Replies:
**3** - Views:
**3273**

### 3.5mm audio jack to 5.1 speakers set?

Hi, My parents recently donated a 5.1 speakers set to me ("It's in the way, come pick it up"), which although a bit dated still works like a charm. The problem is that I only have a laptop with a 3.5mm line out, line in, and mic jacks. Is there any way to make it work anyway? Possibly thro...

- Thu Aug 18, 2011 8:29 am UTC
- Forum: Science
- Topic: gibbs energy of formation for non-standard T & P
- Replies:
**0** - Views:
**732**

### gibbs energy of formation for non-standard T & P

Hi, could someone help me with this? Q: for a hypothetical fluid the gibbs energy of formation (Δ f G Θ ) is -83 kJ/mol the standard entropy (S Θ ) is 89.9 j(k/ mol), the molar mass is 97 g/mol and the density is 1,158 kg/dm 3 . Calculate the gibbs energy for 312 K and 1.5 bar of pressure. A: I've m...

- Wed Jul 13, 2011 5:38 pm UTC
- Forum: Coding
- Topic: Downloading .xlsx files with php
- Replies:
**2** - Views:
**1925**

### Downloading .xlsx files with php

So i'm writing a script that fetches an excel file from a website and writes it to a file on my webserver. There's a problem however; it downloads image files just fine, but when it downloads a .xlsx file, excel can't open it because it's corrupt. This is the code I'm using: function get_file($sessi...

- Wed Jun 15, 2011 1:44 pm UTC
- Forum: Mathematics
- Topic: Question about probability theory
- Replies:
**6** - Views:
**1186**

### Re: Question about probability theory

Wow, I totally get it now. thanks!

- Wed Jun 15, 2011 12:33 pm UTC
- Forum: Mathematics
- Topic: Question about probability theory
- Replies:
**6** - Views:
**1186**

### Question about probability theory

Hi, I'm studying probability theory and I've come across a problem of which I don't understand the solution, could someone please explain it to me? Q: A continuous random variable X has a probability density function f X (x) with 1,5x-0,75x 2 for 0<x<2 and 0 elsewhere. what is the probability densit...

- Fri Apr 01, 2011 7:27 pm UTC
- Forum: Mathematics
- Topic: Could someone explain how to derive this?
- Replies:
**3** - Views:
**844**

### Re: Could someone explain how to derive this?

I am not exactly sure how you got the equation that you have. The equation o' the text is done by using separation o' variables, then do partial fractions on the P side. Integrate, substitute, and simplify after that. Well I get to the point where you get ∫\frac{1}{P(M-P)}*dP =∫ kdt and the...

- Fri Apr 01, 2011 6:16 pm UTC
- Forum: Mathematics
- Topic: Could someone explain how to derive this?
- Replies:
**3** - Views:
**844**

### Could someone explain how to derive this?

So, I'm studying for a calculus final and I'm stuck on this: The chapter is about differential equations and this particular bit is about population models. The book gives this formula: \frac{dP}{dt}=kP(M-P) with P(0) = P 0 and then casually mentions that it can be derived to P(t)=\f...

- Fri Mar 25, 2011 6:11 pm UTC
- Forum: Science
- Topic: retroviruses
- Replies:
**18** - Views:
**2498**

### Re: retroviruses

What THEORETICALLY would be possible is for a vector/virus/nanobot to insert your unmutated DNA (which was taken from you when you were born) into your now old and damaged DNA, at a random point. Then have specialized enzymes, which were conveniently spliced into your DNA, to remove the old DNA (rec...

- Thu Feb 17, 2011 4:54 pm UTC
- Forum: Science
- Topic: Question about telomeres
- Replies:
**3** - Views:
**563**

### Re: Question about telomeres

Oh, I get it. That wasn't hard at all. Silly me.

Thanks guys

Thanks guys