MHB Want to use probability algorithm for my web app

AI Thread Summary
A freelance web developer is creating an answer filtering tool that poses six questions, with subsequent questions determined by previous answers. Each question offers 5-6 options, and the developer seeks to calculate the probability of each option's selection. The solution involves implementing binary concepts similar to electronic logic gates, where selected answers are represented as binary values. The developer is using Vuex for state management to ensure only the relevant question is visible based on user input. A free GitLab page will be shared for others to access this mathematical programming technique.
aaronsmith4
Messages
2
Reaction score
0
I'm a freelance web developer and right now I'm stuck into a mathematical(probability) issue where I'm developing an answer filtering tool.

This tool works as follows:

1) There are six questions that the user will be asked
2) Based on the answer of first question, my server will decide which should be the second question. Based on the answer of second question, the server will decide which should be the third question.
3) Each question has 5-6 options values

Now, for the six questions and each question has 5-6 options, what is the probability each options on my app? Is there any math equation to find out this? Once I solve the math logic, I would easily code the same.
 
Physics news on Phys.org
Ok, I have found the solution, I'm going to implement the binary concepts to solve this issue. Just like the electronics logic gates. In these logic gates, zeros means the connection is closed and one means the connection is open. Scraped this and got the js code

Here in this algorithm, I have used to same. Once the user enters one condition and the equivalent question according to the selected condition will have the 1 binary value and all the other numbers will have zero binary value.

I have used Vuex for state-management. With Vuex, only questions with 1 input will be visible all the other questions will be invisible.

I will share the free gitlab page url so that anyone can copy this math programming trick and implement in their projects..
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...

Similar threads

Replies
11
Views
3K
Replies
41
Views
5K
Replies
4
Views
1K
Replies
6
Views
5K
Replies
1
Views
1K
Back
Top