Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write pseudocode or Python for a thumbs up. :) 1 Q1 We are given a set of n spies each of whom needs to

Please write pseudocode or Python for a thumbs up. :)

image text in transcribed

1 Q1 We are given a set of n spies each of whom needs to meet exactly one messenger from a set of n messengers and a set of possible locations [l] = {1,... ,l} where they can meet. For each spy i, there is a subset Si C [l] of the possible locations where spy i can go. Similarly, there is a subset Mi C [l] of the possible locations where messenger i can go. Moreover, each location j can handle at most cj pairs of spy-messenger meetings. The task is to decide if there is a possible way to match up spies and messengers such that every pair meets at one of their common locations. Formally, does there exist a permutation o on n vertices (mapping spies to messengers) and a function f : [n] [l] mapping spies to locations such that 1. Vi [n], f(i) e Sin Mo(i) (every spy-messenger pair meets at a location which they can both visit) 2. Vj E [l],{i | f(i) = j}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

4. I can tell when team members dont mean what they say.

Answered: 1 week ago