Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in Python using step counts Algorithm 2: Matching Group Schedules The group schedule matching problem takes two or more arrays as input. The arrays

Write in Python using step counts

image text in transcribed

Algorithm 2: Matching Group Schedules The group schedule matching problem takes two or more arrays as input. The arrays represent availabilities and daily working periods of group members. The output is an array containing intervals of time when all members are available for a meeting. The group schedule problem can be defined as shown below: Group Schedule Problem input: arrays m of related elements, comprising the time intervals, and a HashMap, d, representing a daily active periods of all members. . U is a global set of all arrays. The problem can be represented as: U=i=1nmi output: a set of HashMap, r, such that rU Assume there are at least two persons in your class project group. You want to schedule a meeting with another group member. You are provided with (a) a schedule of members' daily activities, containing times of planned engagements. They are not available to have a meeting you during these periods; (b) the earliest and latest times at which they are available for meetings daily. Your schedule and availabilities are provided too. Write an algorithm that takes in your schedule, your daily availability (earliest time, latest time) and that of your group member (or members), and the duration of the meeting you want to schedule. Time is given and should be returned in 24hr military format (HH:MM), for example: 9:30,22:21. The given times (output) should be sorted in ascending order. An algorithm for solving this problem may involve combing the two sub-arrays into an array containing a set of unavailabilities, with consideration of the daily active periods. Sample input person1_Schedule =[[ '7:00', '8:30'], ['12:00', '13:00'], ['16:00', '18:00']] person1_DailyAct =[9:00,,19:00] person2_Schedule =[[ '9:00', '10:30'], ['12:20', '14:30'], ['14:00', '15:00'], ['16:00', '17:00' ]] person2_DailyAct =[[9:00,18:30] duration_of_meeting =30 Sample output [['10:30', '12:00'], ['15:00', '16:00'], ['18:00', '18:30']]

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_2

Step: 3

blur-text-image_3

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions