Expected value of the sum of three different die

Suppose you have a 4-sided die, a 6-sided die, and a 12-sided die. You roll the three dice and add up the numbers that show up. What is the expected value of the sum of the rolls?

My attempt solution is using indicators. Here is the outline:

Let $ I_A=\{4-sided\}$ , $ I_B=\{6-sided\}$ , $ I_C=\{12-sided\}$ and $ X=I_A+I_B+I_C$ . So, $ $ E[X]=E[I_A]+E[I_B]+E[I_C]=P(A)+P(B)+P(C)=2.5+3.5+6.5=12.5$ $ where $ P(A)$ is the expected sum of rolling a 4-sided die, and similar for the other two.

Is my approach correct? If we want the expected value of the three rolls shouldn’t we add the expected sum of each of die?

I have doubts because continuing with this I get a negative variance which shouldn’t happen. Unless I miscalculated the variance.

Find non-duplicated integer in a list where every integer occurs three times except for one integer

The task

Given an array of integers where every integer occurs three times except for one integer, which only occurs once, find and return the non-duplicated integer.

For example, given [6, 1, 3, 3, 3, 6, 6], return 1. Given [13, 19, 13, 13], return 19.

Do this in O(N) time and O(1) space.

My solution

const arr = [6, 1, 3, 3, 3, 6, 6]; const findUnique = arr => {   const set = new Set();   return arr.reduce((sum, n) => set.has(n) ?                     sum - n :                     (set.add(n), sum + 2 * n), 0) / 2; }; 

Because of the Set it has O(n) space, I guess. I currently don’t know how to solve it with O(1) space.

Three Adults staying in a room that says two addults on the reservation

Me and one other friend have booked a package holiday in Spain later this year. I have one another friend that wants to join us as he can get booked on the same flight. But the reservation is for only two adults not three. On the booking it says the room sleeps 3 and has a pull out sofa bed. Do you think he will be alright (6 nights) if we take his bag upstairs for him on the first day and he comes up to the room 3 minutes after or before we do throughout our stay or will he get caught and if we do get caught what will happen ?

Of ten fifty-peso bills, three are counterfeit. Six bills are chosen.

Of ten $ 1 bills, three are counterfeit. Six bills are chosen at random. What is the probability that all counterfeit bills are chosen?

I tried solving for the number of ways the six bills could be rearranged if three counterfeit bills and three genuine bills are chosen, which is 20, but I don’t know how to move on from there.

Will my Tier 1 endorsement letter still be good if the three month mark passes after it has reached New York?

I’ve passed Stage 1 of the Tier 1 Exceptional Promise visa. I received my letter notifying I had passed on Feb 3rd and it’s valid for three months, so as I understand it, I must have Stage 2 of the application completed by May 3rd. I applied online on April 6th and scheduled my biometrics appointment for the earliest available date, April 15th. But with the March 29th suspension of biomentric services at all Application Support Centers in the US, it looks like I’ll be lucky if I get my application, passport, letter of endorsement, etc sent to NY before that May 3rd deadline. But as long as the package containing all those important materials including the letter reach NY before May 3rd, the letter should still be good even if nobody in their office opens the envelope until after May 3rd, correct?

How to compute the amplitude of a sampled wave in three dimensional space

I have a sine or cosine wave in a random direction in 3D space and in a random orientation. I want to calculate the amplitude and axis for such a wave. I am sampling the wave at a high rate, compared to the frequency of the wave. I am getting the 6 DOF values for each sample.

I am looking for pointers on how to compute the amplitude and axis of the wave.

Are those three bitcoin mining app from google play store legit or fake?

There are three apps that look the same. They both allow you to upgrade the mining speed through buying their plan but only with the bitcoin you got from mining bitcoin so no need to buy plan with your bitcoin from bitcoin wallet address. The review are confused. From good review to bad review. Some youtuber have done a review about the bitcoin mining app but never show proof payment. One youtuber say it’s a scam. Does anyone withdraw bitcoin from those apps? Please if you withdraw bitcoin from any of those apps show proof.

Cloud Bitcoin Miner – Remote Bitcoin Mining https://play.google.com/store/apps/details?id=my.mine.btc

Bitcoin Remote Miner – Mine BTC Remotely https://play.google.com/store/apps/details?id=get.bitcoins.for.free

Remote bitcoin server miner – Get free BTC https://play.google.com/store/apps/details?id=btc.mine.on.cloud

YouTube review of bitcoin mining app from google play store link.

Server Bitcoin Miner App Review From Kira Kage YouTube channel https://m.youtube.com/watch?v=dOWn3B5gcLY

SERVER BITCOIN MINER & CLOUD BITCOIN MINING – Get Paid BTC Daily from APPHUSTLE -TV YouTube channel https://m.youtube.com/watch?v=JpcHMbd8cdU

Server Bitcoin Miner Totally Fake App Form Onhax Pk YouTube channel. I’m not sure which app he or she talk about https://m.youtube.com/watch?v=Ni11KRDaF7s

Is the 3 day Interactive Design course by Tognazzini at Norman Group Conference worth foregoing the other classes for those three days?

I am somewhat new to the UX field (with very few mentors, leading it) and my company is sending me to the Norman Group Conference in San Francisco this June! I’m trying to pick classes and wondering if the three day Interactive Design course by Bruce “Tog” Tognazzini taught at the Norman group conference worth foregoing the other classes for those three days?

The list of classes I am interested in attending (in order of interest) are below if you have any more feedback! I appreciate it!

Day 1 1. Managing UX Strategy (management)

Day 2 1. User Research Methods: From Strategy to Requirements to Design (research) 2. Measuring UX and ROI (research)

Day 3 1. Interaction Design: 3 day (interaction) 2. Being a UX Leader: Essential Skills for Any UX Practitioner (management) 3. Design Systems and Pattern Libraries (management)

Day 4 1. Interaction Design: 3 Day (interaction) 2. User Interface Principals Every Designer Must Know (interaction)

Day 5 1. Interaction Design: 3 Day (interaction) 2. Emerging Patterns in Interface Design (interaction) 3. Analytics and User Experience (research)

Day 6 1. Application Design for Web and Desktop (interaction)

Three Shopping Bag Problem

How can we prove that we can use partition to prove three bag problem is np-complete. Three Bag problem: How can we fit m items into 3 bags, if each bag can hold upto B grams of weight

We can reduce this problem as a three sum subset problem using partitions as an np-complete problem. But how can we reduce partition into this problem.