function [rewardsMean, rewardsSqSum, explicitBid] = initPriorBoundedEUMAS( advertiser, topicMeans, candidates , budget, rewardsMean, rewardsSqSum, explicitBid)

[B,I] = sort(topicMeans,'descend');
numCandidates = numel(candidates);

topicIndex = 1;

while(budget > 0)
     
    topic = I(topicIndex);         

    for k=1:numCandidates
           rewardsMean(candidates(k),topic,advertiser) = topicMeans(topic);
           rewardsSqSum(candidates(k),topic,advertiser) = 0;
           explicitBid(candidates(k),topic,advertiser) = 1;
    end
    budget = budget - numCandidates;
    topicIndex = topicIndex + 1;
end

bound = topicMeans(I(2));

for topicIndex = 3:10
    topic = I(topicIndex);
        for k=1:numCandidates
           rewardsMean(candidates(k),topic,advertiser) = bound;
           rewardsSqSum(candidates(k),topic,advertiser) = 0;
        end
    
end

end



