Jump to content

Mathematics


Harut

Recommended Posts

I just wrote a small app as well and found 3 answers.

 

here is the small vb code. I know it is not clean.

 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       Dim x, y, i As Integer
       Dim z As String
       Dim nums(9) As Char

       For x = 316 To 948
           y = x * x
           z = CStr(x) & CStr(y)
           For i = 1 To 9
               nums(i) = (Mid$(z, i, 1))
           Next

           If HasDuplicateValues(nums) = False Then
               MsgBox(z & " " & "has no dups")
           End If
       Next

   End Sub


   Function HasDuplicateValues(ByVal arr As Array) As Boolean
       Dim ht As New Collections.Hashtable(arr.Length * 2)
       Dim index As Integer

       For index = 0 To arr.Length - 1
           Dim value As Object = arr.GetValue(index)

           If ht.Contains(value) Then
               ' return True if the value is already in the hashtable
               Return True
           Else
               ' else just add it to the hashtable now
               ht.Add(value, Nothing)
           End If
       Next
   End Function

Link to comment
Share on other sites

  • Replies 588
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I just wrote a small app as well and found 3 answers.

 

here is the small vb code. I know it is not clean.

Azat, there are only two answers. you found three because you didn't check for digit 0.

Link to comment
Share on other sites

  • 2 weeks later...

Not sure if this was posted:

 

Country x is planning to attack country y, and country y is anticipating the attack. Country x can either attack by land or by sea. Country y can either prepare for a land defense or a sea defense. Both countries must choose either an all land or all sea strategy, they may not divide their forces. The following are the probabilities of a successful invasion according to both strategies used.

 

If x launches an attack by sea and y prepares a defense by sea the probability of a successful invasion is 80%.

 

If x launches an attack by sea and y prepares a defense by land the probability of a successful invasion is 100%.

 

If x launches an attack by land and y prepares a defense by land the probability of a successful invasion is 60%.

 

If x launches an attack by land and y prepares a defense by sea the probability of a successful invasion is 100%.

 

What should the strategy of country x be, assuming the goal is to maximize the probability of a successful invasion? Assume the goal of country y to be to minimize the probability of a successful invasion. What is the final probability of a successful invasion assuming both utilize an optimal strategy?

Link to comment
Share on other sites

  • 3 weeks later...
Can you make fire with ice? Support your answer.

Given that:

- It's a sunny day

- You have a block of ice (preferably more than one, in case you screw up and drop the thing)

- You have an ice-carving tool

- there is dry kindling nearby

 

 

Take a block of ice.

Carve a rudimentary magnifying glass.

Gather dry kindling.

Hope for bright sun.

Use the magnifying glass to concentrate the sun's rays to burn the small amounts of kindling. Remember to allow for plenty of O2

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...

Original slightly modified from Cartalk

As you guys know I have been talking about how computer industry is going down the drain and how I am going to go to home painting. So here is the statistics from my new business when I did a trial run. Domino, Sip and I decided to paint this house to see how good we could be.

 

We didn't know which team of us was going to do it, so we sat down and decided to do a little math. We determined that Domino and I together could paint the entire house in 10 days. After all, we had a lot of painting experience as kids.

 

Sip and I could do it in 15 days. And, if Sip and Domino worked together, they could do it in 30 days.

 

The question is how long would it take each of us, painting by ourselves, to paint the whole house?

Link to comment
Share on other sites

Original slightly modified from Cartalk

As you guys know I have been talking about how computer industry is going down the drain and how I am going to go to home painting. So here is the statistics from my new business when I did a trial run. Domino, Sip and I decided to paint this house to see how good we could be.

 

We didn't know which team of us was going to do it, so we sat down and decided to do a little math. We determined that Domino and I together could paint the entire house in 10 days. After all, we had a lot of painting experience as kids.

 

Sip and I could do it in 15 days. And, if Sip and Domino worked together, they could do it in 30 days.

 

The question is how long would it take each of us, painting by ourselves, to paint the whole house?

Do I have the right to answer this question, as one of the painters? :D

Link to comment
Share on other sites

Let me guess. Domino wouldn't paint any house on his own becuse he would be wondering and wondering, the fall asleep. :P  :D  :D  :D

Yep, the truth is that, me and Azat painting with eachothers will go faster, because while I wonder, I do have a belt wth me, and everytime Azat is slowing down, I'll use it to spank him. :D So finally, the job will be done more quikly. :P

 

..

Edited by Fadix
Link to comment
Share on other sites

Well, with the speed you go, and others go, a little spanking would make me and Sip useless in painting. Sip is already useless. ;)

 

 

Since no one seems to be interested to answer the question, I will then.

 

Courses of Math for dummies. :)

 

x = number of days it takes to Domino

y = number of days it takes to Azat

z = number of days it takes to Sip

 

It is an inverse function, since more days you take, slower you are...

 

Me painting with Azat, the function representing it would be.

 

(1/x) + (1/y) = 1/10 (a)

 

Azat painting with Sip, the function representing it would be.

 

(1/y) + (1/z) = 1/15 (b.)

 

Me painting with Sip, the function representing it would be.

 

(1/x) + (1/z) = 1/30 (c.)

 

The reason it is 1/x etc... and not x, is because like I said above, it is an inverse function, less you have, better it is... more faster you are, adding you with a slower one, as a result it will go much faster... Its like calculating the Intensity in a parallel Circuit in Electronic. :)

 

Now, we can make a substitution.

 

Isolating the (1/x) from the function (a)

 

(1/x) = (1/10) - (1/y)

 

Substituating it in the function (c.)

 

((1/10) - (1/y)) + (1/z) = 1/30

 

Fron this new function, we can isolate (1/z)

 

(1/z) = (1/y) - (1/15)

 

Substituating it in the function (b.)

 

(1/y) + ((1/y) - (1/15)) = 1/15

 

2/y = 2/15

1/y = 1/15

y = 15

 

Azat alone will do it in 15 days.

Azat with Sip, they will do it in 15 days... what that mean is that while Azat is painting, Sip is sleeping. :D

 

Therefore, I paint in 30 days, since Sip is of no uses in painting, what he can do best is watching us paint.

 

Lazzy kid. :P

Edited by Fadix
Link to comment
Share on other sites

Since we are at it(addition of "natural"(I translated from the French word, maybe this is not what they use in English) numbers)...

 

Is there someone here that could demonstrate the existance of "natural" numbers? This sound a stupid question, but it has already been done... pages.

 

So is there one here that can dare do that? :) and then demonstrate the existance of additions? (it is automatic once you have demonstrated the existance of natural numbers).

 

EDITED: Note: Additions are fondamental in the demonstration, you may think that it is stupid to prove the existance of additions after the demonstration, when you do need them for the "series" addition... but once you have demonstrated the existance of Natural numbers, you can automatically prove the existance of additions.

Edited by Fadix
Link to comment
Share on other sites

  • 4 months later...

Okay Harutik and Fadiushka and all others who know some basic physics and math. :)

 

My friend Sip has a seesaw. The board of the seesaw is a foot wide and eight-feet long. It weighs 36 pounds.

 

"What's odd is that the fulcrum is two feet from one end. Of course, there's six feet on the other end. On the short side, he's placed a solid concrete cube, which is one foot on each side, right at the end of the board. The cube weighs 48 pounds. He wants to balance the seesaw."

 

So, here's the question: What weight, also a solid cube one foot on a side, does he have to put all the way at the other end, for the seesaw to balance?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...