Einsteins needed here ...

  • Thread starter Savvoulidis Iordanis
  • Start date
S

Savvoulidis Iordanis

Hi there.
Lately I work on a lottery application about football.
The user chooses a number of matches and each match has a different profit
depending on the final outcome (for home win (1) : 2.01 , for even (X) :
1.50 and for guest(2) : 3.50

So a player's game card is like the following:
MATCH ID HOME GUEST 1 X 2 CHOICE PROFIT
----------------------------------------------------------------------------
------
151 Team1 Team2 2.01 1.50 3.50 1
2.01
152 Team3 Team4 1.51 2.20 2.80 X
2.20
153 Team5 Team6 1.58 2.30 2.70 2
2.70
154 Team7 Team8 1.55 2.20 2.90 2
2.90
155 Team9 Team10 1.52 2.50 2.30 1
1.52
156 Team11 Team12 1.57 2.23 2.20 1
1.57

The maximum profit is the product of all the profits in the card.
A valid card is one that has all predictions correct, unless a player has
chosen to play with combinations
(2,3,4,5) which means that the card is still valid even if the predictions
are correct, searching them by 2,3,4,5. So the final profit in this case is
the sum of the products of all those combinations. Example follows:
If the player uses the type 3 and 4 combination, then if matches
151,153,154,156 where predicted correctly, then the final profit is :

Type4 profit = 2.01*2.70*2.90*1.57
Type3 profit = 2.01*2.70*2.90 + 2.01*2.90*1.57 + 2.70*2.90*1.57
Final profit = Type3 + Type4 profits

To compute the Type4 profit (the product of all profits in the card), I use
the following expr:
EXP( SUM( LOG( [PROFIT] )))

I don't know if the english used for my question were OK, but the question
is :
Can this I compute the Final Profit using a single function (may be an
expanded version of the function above)?

PS. I know it IS unbelievable for all of you to read a question like this,
but any help is appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top