'''simple docstring'''




def 							lowerCamelCase			(   UpperCAmelCase__ :      list[int]   ,   UpperCAmelCase__ :      list[int]   ,   UpperCAmelCase__ :      int				)    ->   bool:
							return not any(
							    neighbour == 1 and colored_vertices[i] == color
							    for i, neighbour in enumerate(UpperCAmelCase__				)				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      list[list[int]]   ,   UpperCAmelCase__ :      int   ,   UpperCAmelCase__ :      list[int]   ,   UpperCAmelCase__ :      int				)    ->   bool:

							# Base Case
							if index == len(UpperCAmelCase__				):
														return True

							# Recursive Step
							for i in range(UpperCAmelCase__				):
														if valid_coloring(graph[index]   ,   UpperCAmelCase__   ,   UpperCAmelCase__				):
																					# Color current vertex
																					lowercase_      :    Union[str, Any]       		= i
																					# Validate coloring
																					if util_color(UpperCAmelCase__   ,   UpperCAmelCase__   ,   UpperCAmelCase__   ,   index + 1				):
																												return True
																					# Backtrack
																					lowercase_      :    int       		= -1
							return False




def 							lowerCamelCase			(   UpperCAmelCase__ :      list[list[int]]   ,   UpperCAmelCase__ :      int				)    ->   list[int]:
							lowercase_      :    List[Any]       		= [-1] * len(UpperCAmelCase__				)

							if util_color(UpperCAmelCase__   ,   UpperCAmelCase__   ,   UpperCAmelCase__   ,   0				):
														return colored_vertices

							return []






'''simple docstring'''




from collections.abc import Callable

import numpy as np




def 							lowerCamelCase			(   UpperCAmelCase__ :      Callable   ,   UpperCAmelCase__ :      float   ,   UpperCAmelCase__ :      float   ,   UpperCAmelCase__ :      float   ,   UpperCAmelCase__ :      float				)    ->   np.array:
							lowercase_      :    Any       		= int(np.ceil((x_end - xa) / step_size				)				)
							lowercase_      :    List[Any]       		= np.zeros((n + 1,)				)
							lowercase_      :    List[Any]       		= ya
							lowercase_      :    List[str]       		= xa

							for k in range(UpperCAmelCase__				):
														lowercase_      :    Optional[Any]       		= y[k] + step_size * ode_func(UpperCAmelCase__   ,   y[k]				)
														lowercase_      :    List[Any]       		= y[k] + (
														    (step_size / 2) * (ode_func(UpperCAmelCase__   ,   y[k]				) + ode_func(x + step_size   ,   UpperCAmelCase__				))
														)
														x += step_size

							return y


if __name__ == "__main__":
						import doctest

						doctest.testmod()





